drivers/fsi: Add device & driver definitions
authorJeremy Kerr <jk@ozlabs.org>
Wed, 1 Feb 2017 16:53:42 +0000 (10:53 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Feb 2017 14:19:48 +0000 (15:19 +0100)
Add structs for fsi devices & drivers, and struct device conversion
functions.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Chris Bostic <cbostic@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/fsi.h

index 47aa181b640442e1a3acef2d05da68f7da4d2027..f73886a5af01a75e9a5afac6d951d61578e799b0 100644 (file)
 
 #include <linux/device.h>
 
+struct fsi_device {
+       struct device dev;
+};
+
+struct fsi_driver {
+       struct device_driver drv;
+};
+
+#define to_fsi_dev(devp) container_of(devp, struct fsi_device, dev)
+#define to_fsi_drv(drvp) container_of(drvp, struct fsi_driver, drv)
+
 extern struct bus_type fsi_bus_type;
 
 #endif /* LINUX_FSI_H */