Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Driver core: Add accessor for device platform data

For consistency with driver data provide a dev_get_platdata() accessor
for reading the platform data from a device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Mark Brown and committed by
Greg Kroah-Hartman
a5b8b1ad b4028437

+5
+5
include/linux/device.h
··· 494 494 } 495 495 extern void root_device_unregister(struct device *root); 496 496 497 + static inline void *dev_get_platdata(const struct device *dev) 498 + { 499 + return dev->platform_data; 500 + } 501 + 497 502 /* 498 503 * Manual binding of a device to driver. See drivers/base/bus.c 499 504 * for information on use.