Re: [PATCH] add legacy resources to sysfs

From: Greg KH
Date: Tue Dec 21 2004 - 19:07:03 EST

On Tue, Dec 21, 2004 at 03:42:47PM -0800, Jesse Barnes wrote:
> On Tuesday, December 21, 2004 2:05 pm, Jesse Barnes wrote:
> > On Tuesday, December 21, 2004 1:46 pm, Greg KH wrote:
> > > You are passing the wrong things around :)
> > >
> > > A struct pci_bus is a struct class_device, not a struct device. I think
> > > you need to rethink your goal of putting the files into the pci device
> > > directory, or just put the files into the proper /sys/class/pci_bus/*
> > > directory as your code assumes is happening.
> >
> > Something like this then? I added bin file support to class.c and use that
> > instead from probe.c. I also fixed the container_of stuff in pci-sysfs.c.
> Here it is w/o the ia64 stuff. That way people can buy off on the API and not
> worry about the platform stuff. I can send that to Tony separately if
> there's agreement on this part. I'd like to create a symlink
> from /sys/class/pci_bus/<bus>/legacy_* to /sys/devices/pci<foo>/legacy_* too,
> how do I do that?

You can make a symlink to a kobject, not a attribute. We already have a
symlink in that directory to the device, so do you really need another

> drivers/base/class.c | 16 ++++++++++

Hm, how about splitting this further, one for the driver core stuff (you
forgot the device.h change here too...) and the other for the PCI stuff?


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
Please read the FAQ at