From: Matt Domsch <Matt_Domsch@dell.com>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [RFC] 2.6.0 EDD enhancements
Date: Fri, 19 Dec 2003 14:37:49 -0600 [thread overview]
Message-ID: <20031219143749.A8351@lists.us.dell.com> (raw)
In-Reply-To: <1071865401.1943.31.camel@mulgrave>; from James.Bottomley@steeleye.com on Fri, Dec 19, 2003 at 03:23:21PM -0500
> This is a bit nasty...you're assuming a lot of hidden knowledge about
> the layout of sysfs objects in scsi_device in this code.
>
> The current(*) way you should be doing this is to use scsi_device_get()
> in your edd_match_scsi_dev() and do a scsi_device_put() after creating
> the link...that should be hotplug robust.
Ok, I'll gladly make that change, but I still need a handle on the
sdev_gendev.kobj in order to make the symlink:
> rc = sysfs_create_link(&edev->kobj,
> &sdev->sdev_gendev.kobj,
> "disc");
While there's an accessor function to_scsi_device() to go from the
struct device to the struct scsi_device, there's not accessor to go from the
scsi_device to the struct device, which would further abstract
struct internals. Can I get such added to a SCSI header file?
Something like:
static inline struct device *
sdev_to_gendev(struct scsi_device *sdev)
{
return &sdev->sdev_gendev;
}
Thanks,
Matt
--
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
next prev parent reply other threads:[~2003-12-19 20:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-19 18:57 [RFC] 2.6.0 EDD enhancements Matt Domsch
2003-12-19 19:01 ` Matt Domsch
2003-12-19 19:01 ` Matt Domsch
2003-12-19 20:23 ` James Bottomley
2003-12-19 20:37 ` Matt Domsch [this message]
2003-12-19 21:03 ` James Bottomley
2003-12-28 20:08 ` Christoph Hellwig
2003-12-29 20:05 ` Matt Domsch
2003-12-19 19:01 ` Matt Domsch
2003-12-19 19:03 ` Randy.Dunlap
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=20031219143749.A8351@lists.us.dell.com \
--to=matt_domsch@dell.com \
--cc=James.Bottomley@steeleye.com \
--cc=linux-kernel@vger.kernel.org \
--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