From: Shaohua Li <shaohua.li@intel.com>
To: Greg KH <greg@kroah.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
Patrick Mochel <mochel@digitalimplant.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 1/2] request_firmware without a device
Date: Thu, 25 May 2006 12:49:10 +0800 [thread overview]
Message-ID: <1148532550.32046.107.camel@sli10-desk.sh.intel.com> (raw)
In-Reply-To: <20060525040134.GA29974@kroah.com>
On Wed, 2006-05-24 at 21:01 -0700, Greg KH wrote:
> On Thu, May 25, 2006 at 11:50:45AM +0800, Shaohua Li wrote:
> > The patch allows calling request_firmware without a 'struct device'.
> > It appears we just need a name here from 'struct device'. I changed it
> > to use a kobject as Patrick suggested.
> > Next patch will use the new API to request firmware (microcode) for a CPU.
>
> But a cpu does have a struct device. Why not just use that?
It's a sysdev, no 'struct device' in it, IIRC.
> > +fw_setup_class_device_id(struct class_device *class_dev, struct kobject *kobj)
> > {
> > /* XXX warning we should watch out for name collisions */
> > - strlcpy(class_dev->class_id, dev->bus_id, BUS_ID_SIZE);
> > + strlcpy(class_dev->class_id, kobj->k_name, BUS_ID_SIZE);
>
> There's a function for this, kobject_name(), please never touch k_name
> directly.
Ok, will do.
> > +EXPORT_SYMBOL(request_firmware_kobj);
>
> Ick, if you really want to do this, just fix up all callers of
> request_firmware(), there aren't that many of them.
>
> But I don't recommend it anyway.
I didn't see why we need a 'struct device' for request_firmware. It just
needs a name to me.
Thanks,
Shaohua
next prev parent reply other threads:[~2006-05-25 4:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-25 3:50 Shaohua Li
2006-05-25 4:01 ` Greg KH
2006-05-25 4:49 ` Shaohua Li [this message]
2006-05-25 10:26 ` Marcel Holtmann
2006-05-25 14:55 ` Greg KH
2006-05-25 10:24 ` Marcel Holtmann
2006-05-26 3:40 ` Shaohua Li
2006-05-26 4:06 ` Greg KH
2006-05-26 4:41 ` Shaohua Li
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=1148532550.32046.107.camel@sli10-desk.sh.intel.com \
--to=shaohua.li@intel.com \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@digitalimplant.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
all inboxes | Powered by JetHome®