Re: [PATCH 2/11] LED: Add LED Class



On Tue, 2006-01-31 at 12:59 -0800, Greg KH wrote:
> On Tue, Jan 31, 2006 at 01:41:28PM +0000, Richard Purdie wrote:
> > +/**
> > + * led_device_register - register a new object of led_device class.
> > + * @dev: The device to register.
> > + * @led_dev: the led_device structure for this device.
> > + */
> > +int led_device_register(struct device *dev, struct led_device *led_dev)
>
> Shouldn't struct led_device contain a struct device within it, like the
> rest of the driver model?

The code supports more than one led per struct device.

Perhaps the name is misleading and should be led_class_register? The
code has changed a lot through its various development stages (it did
start out as a device IIRC).

led_device should also probably be led_class by that argument...

Richard

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH 2/11] LED: Add LED Class
    ... >> rest of the driver model? ... > The code supports more than one led per struct device. ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [PATCH 2/11] LED: Add LED Class
    ... Shouldn't struct led_device contain a struct device within it, ... rest of the driver model? ... Prev by Date: ...
    (Linux-Kernel)
  • Re: [Scst-devel] Discussion about SCST sysfs layout and implementation.
    ... Do you mean that uses struct device is the right way to do it instead of kobjects or it is just a option to get things on right places into sysfs? ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [PATCH 3/3] sound: use dev_set_drvdata
    ... struct device *dev; ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [RFC][PATCH] PM: Add pm_trace switch
    ... +#ifdef CONFIG_PM_TRACE ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)