From: Greg KH <greg@kroah.com>
To: Shaohua Li <shaohua.li@intel.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: Wed, 24 May 2006 21:01:34 -0700 [thread overview]
Message-ID: <20060525040134.GA29974@kroah.com> (raw)
In-Reply-To: <1148529045.32046.102.camel@sli10-desk.sh.intel.com>
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?
> +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.
> +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.
thanks,
greg k-h
next prev parent reply other threads:[~2006-05-25 4:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-25 3:50 [PATCH 1/2] request_firmware without a device Shaohua Li
2006-05-25 4:01 ` Greg KH [this message]
2006-05-25 4:49 ` Shaohua Li
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=20060525040134.GA29974@kroah.com \
--to=greg@kroah.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@digitalimplant.org \
--cc=shaohua.li@intel.com \
/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