Re: [PATCH] PCI Hotplug fixes for 2.6.4-rc1

From: Greg KH
Date: Thu Mar 04 2004 - 13:29:45 EST


On Thu, Mar 04, 2004 at 07:17:37AM +0100, Ingo Oeser wrote:
> Hi Greg,
>
> On Wednesday 03 March 2004 05:21, Greg KH wrote:
> > -decl_subsys(pci_hotplug_slots, &hotplug_slot_ktype, NULL);
> > -
> > +/*
> > + * We create a struct subsystem on our own and not use decl_subsys so
> > + * we can have a sane name "slots" in sysfs, yet still keep a good
> > + * global variable name "pci_hotplug_slots_subsys.
> > + * If the decl_subsys() #define ever changes, this declaration will
> > + * need to be update to make sure everything is initialized properly.
> > + */
> > +struct subsystem pci_hotplug_slots_subsys = {
> > + .kset = {
> > + .kobj = { .name = "slots" },
> > + .ktype = &hotplug_slot_ktype,
> > + }
> > +};
>
> How about creating a decl_subsys_name() for creating sane names,
> like we have for the module parameters?
>
> That whould solve all those problems, since this is used not only once.

Good idea. Care to make up such a patch?

thanks,

greg k-h
-
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/