aboutsummaryrefslogtreecommitdiffstats
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 cd46ee58b9dc..ce8e4ffd78c7 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -180,6 +180,9 @@ struct platform_driver {
180 const struct platform_device_id *id_table; 180 const struct platform_device_id *id_table;
181}; 181};
182 182
183#define to_platform_driver(drv) (container_of((drv), struct platform_driver, \
184 driver))
185
183/* 186/*
184 * use a macro to avoid include chaining to get THIS_MODULE 187 * use a macro to avoid include chaining to get THIS_MODULE
185 */ 188 */