[PATCH 20/44] staging: unisys: Move the visorbus device underneath devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Don Zickus <dzickus@xxxxxxxxxx>

Mimicing what other drivers do, this seems appropriate.  Yeah, it
is a bus, but it is a bus _device_.  This makes things work better
and smoother.  Now the sysfs looks like

[root@dhcp-17-174 visorbus]# ls -l /sys/bus/visorbus/devices/
total 0
lrwxrwxrwx. 1 root root 0 Apr 17 16:09 vbus1:dev2 ->
		../../../devices/visorbus1/vbus1:dev2
lrwxrwxrwx. 1 root root 0 Apr 17 16:09 visorbus1 ->
		../../../devices/visorbus1

Which looks correct.  All the attributes are still correct too, based on my
very minimal testing of 'ls -lR'. :-)

Signed-off-by: Don Zickus <dzickus@xxxxxxxxxx>
Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index e299371..a9cbaa6 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -1491,6 +1491,7 @@ create_bus_instance(int id)
 		goto away;
 	}
 	dev_set_name(&devdata->dev, "visorbus%d", id);
+	devdata->dev.bus = &visorbus_type;
 	devdata->dev.groups = visorbus_groups;
 	devdata->dev.release = visorbus_release_busdevice;
 	if (device_register(&devdata->dev) < 0) {
-- 
2.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux