1

How show the same struct device in bus and class in sysfs structure? I'm getting an error when doing this. Currently I'm assigning bus and class attributes of struct device before calling device_register. The error message says that a device in /device of the same name already exists.

Chen Li
  • 4,824
  • 3
  • 28
  • 55
Alpha0
  • 35
  • 5
  • struct bus_type and struct device type are two different things. A device has a class but a bus does not. mei, for example, creates both a bus and a device. – stark Mar 27 '22 at 19:06
  • a device has a bus attribute to link a device with the bus, also it haves a class attribute to link with a class. however, when I tried to link both before calling device_register I got an error. – Alpha0 Mar 27 '22 at 20:52

0 Answers0