Skip to content

Commit

Permalink
Driver core: Add accessor for device platform data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent b402843 commit a5b8b1a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/linux/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a5b8b1a

Please sign in to comment.