[lkml]   [2006]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/2] request_firmware without a device
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

> +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.


greg k-h
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-05-25 06:06    [W:0.080 / U:8.648 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site