aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/platform_device.h
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-08-15 11:11:45 -0700
committerSage Weil <sage@inktank.com>2013-08-15 11:11:45 -0700
commitee3e542fec6e69bc9fb668698889a37d93950ddf (patch)
treee74ee766a4764769ef1d3d45d266b4dea64101d3 /include/linux/platform_device.h
parentceph: Remove bogus check in invalidatepage (diff)
parentMerge branch 'akpm' (patches from Andrew Morton) (diff)
downloadwireguard-linux-ee3e542fec6e69bc9fb668698889a37d93950ddf.tar.xz
wireguard-linux-ee3e542fec6e69bc9fb668698889a37d93950ddf.zip
Merge remote-tracking branch 'linus/master' into testing
Diffstat (limited to 'include/linux/platform_device.h')
-rw-r--r--include/linux/platform_device.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index 9abf1db6aea6..ce8e4ffd78c7 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -180,7 +180,16 @@ struct platform_driver {
const struct platform_device_id *id_table;
};
-extern int platform_driver_register(struct platform_driver *);
+#define to_platform_driver(drv) (container_of((drv), struct platform_driver, \
+ driver))
+
+/*
+ * use a macro to avoid include chaining to get THIS_MODULE
+ */
+#define platform_driver_register(drv) \
+ __platform_driver_register(drv, THIS_MODULE)
+extern int __platform_driver_register(struct platform_driver *,
+ struct module *);
extern void platform_driver_unregister(struct platform_driver *);
/* non-hotpluggable platform devices may use this so that probe() and