Commit 60302ce4 authored by Stephan Gerhold's avatar Stephan Gerhold Committed by David S. Miller

rpmsg: core: Add driver_data for rpmsg_device_id

Most device_id structs provide a driver_data field that can be used
by drivers to associate data more easily for a particular device ID.
Add the same for the rpmsg_device_id.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 01bf086b
...@@ -459,8 +459,10 @@ static int rpmsg_dev_match(struct device *dev, struct device_driver *drv) ...@@ -459,8 +459,10 @@ static int rpmsg_dev_match(struct device *dev, struct device_driver *drv)
if (ids) if (ids)
for (i = 0; ids[i].name[0]; i++) for (i = 0; ids[i].name[0]; i++)
if (rpmsg_id_match(rpdev, &ids[i])) if (rpmsg_id_match(rpdev, &ids[i])) {
rpdev->id.driver_data = ids[i].driver_data;
return 1; return 1;
}
return of_driver_match_device(dev, drv); return of_driver_match_device(dev, drv);
} }
......
...@@ -447,6 +447,7 @@ struct hv_vmbus_device_id { ...@@ -447,6 +447,7 @@ struct hv_vmbus_device_id {
struct rpmsg_device_id { struct rpmsg_device_id {
char name[RPMSG_NAME_SIZE]; char name[RPMSG_NAME_SIZE];
kernel_ulong_t driver_data;
}; };
/* i2c */ /* i2c */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment