Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5b8b1ad authored by Mark Brown's avatar Mark Brown Committed by Greg Kroah-Hartman
Browse files

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b4028437
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -494,6 +494,11 @@ static inline struct device *root_device_register(const char *name)
}
extern void root_device_unregister(struct device *root);

static inline void *dev_get_platdata(const struct device *dev)
{
	return dev->platform_data;
}

/*
 * Manual binding of a device to driver. See drivers/base/bus.c
 * for information on use.