From: Christoph Hellwig <hch@infradead.org>
To: Mike Anderson <andmike@us.ibm.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi sysfs cleanups
Date: Tue, 19 Nov 2002 16:48:56 +0000 [thread overview]
Message-ID: <20021119164856.A11391@infradead.org> (raw)
In-Reply-To: <20021119153008.GA1544@beaverton.ibm.com>; from andmike@us.ibm.com on Tue, Nov 19, 2002 at 07:30:08AM -0800
On Tue, Nov 19, 2002 at 07:30:08AM -0800, Mike Anderson wrote:
> +static inline void scsi_class_data_set(struct device *dev,
> + struct Scsi_Host *host)
> +{
> + dev->class_data = (void *)host;
> +};
> +
> +static inline struct Scsi_Host *scsi_class_data_get(struct device *dev)
> +{
> + return (struct Scsi_Host *) dev->class_data;
> +};
These casts look rather pointless.
> -module_init(init_scsi);
> +subsys_initcall(init_scsi);
> module_exit(exit_scsi);
What's the exact reason for this change?
> /*
> - * driverfs support for determining driver types
> + * sysfs support
> */
> -EXPORT_SYMBOL(scsi_driverfs_bus_type);
> +EXPORT_SYMBOL(scsi_device_driver_register);
> +EXPORT_SYMBOL(scsi_device_driver_unregister);
> +EXPORT_SYMBOL(scsi_host_class_register);
> +EXPORT_SYMBOL(scsi_host_class_unregister);
> +EXPORT_SYMBOL(shost_devclass);
Why are these exported?
> +/**
> + * scsi_host_class_register - register class scsi host
> + * @dev: class device to register
> + * @shost: scsi host associtated with class device
> + *
> + * Return value:
> + **/
> +int scsi_host_class_register(struct device *dev, struct Scsi_Host *shost)
> +{
> + scsi_class_data_set(dev, shost);
> + scsi_host_dev_set(shost, dev);
> +
> + scsi_add_host(shost);
> +
> + return 0;
> +}
> +
> +/**
> + * scsi_host_class_unregister - unregister class scsi host.
> + * @dev: class device to unregister
> + **/
> +void scsi_host_class_unregister(struct device *dev)
> +{
> + struct Scsi_Host *shost;
> +
> + shost = scsi_class_data_get(dev);
> +
> + scsi_remove_host(shost);
> +
> + scsi_class_data_set(dev, NULL);
> +
> +}
> diff -Nru a/drivers/scsi/sd.c b/drivers/scsi/sd.c
What the point of these? They don't seem to be used at all..
next prev parent reply other threads:[~2002-11-19 16:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-19 15:30 [PATCH] scsi sysfs cleanups Mike Anderson
2002-11-19 16:48 ` Christoph Hellwig [this message]
2002-11-19 18:39 ` Mike Anderson
2002-11-19 23:16 ` Christoph Hellwig
2002-11-20 0:46 ` Mike Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021119164856.A11391@infradead.org \
--to=hch@infradead.org \
--cc=andmike@us.ibm.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox