summaryrefslogtreecommitdiff
path: root/include/linux/platform_device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/platform_device.h')
-rw-r--r--include/linux/platform_device.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index cd46ee5..ce8e4ff 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -180,6 +180,9 @@ struct platform_driver {
const struct platform_device_id *id_table;
};
+#define to_platform_driver(drv) (container_of((drv), struct platform_driver, \
+ driver))
+
/*
* use a macro to avoid include chaining to get THIS_MODULE
*/