mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
of: Modify of_device_get_modalias to be passed struct device
Now that the of_node pointer is part of struct device, of_device_get_modalias could be used on any struct device that has the device node pointer set. This patch changes of_device_get_modalias to accept a struct device instead of a struct of_device. Signed-off-by: Grant Likely <[email protected]> CC: Michal Simek <[email protected]> CC: Benjamin Herrenschmidt <[email protected]> CC: Wolfram Sang <[email protected]> CC: Stephen Rothwell <[email protected]> CC: [email protected] CC: [email protected]
This commit is contained in:
parent
dd27dcda37
commit
34a1c1e8c7
4 changed files with 8 additions and 18 deletions
|
|
@ -41,10 +41,7 @@ compatible_show (struct device *dev, struct device_attribute *attr, char *buf)
|
|||
static ssize_t modalias_show (struct device *dev, struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct of_device *ofdev = to_of_device(dev);
|
||||
int len;
|
||||
|
||||
len = of_device_get_modalias(ofdev, buf, PAGE_SIZE - 2);
|
||||
int len = of_device_get_modalias(dev, buf, PAGE_SIZE - 2);
|
||||
|
||||
buf[len] = '\n';
|
||||
buf[len+1] = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue