Commit b2a637d7 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: hid: use the bundle struct device instead of the connector

We are removing struct device from the gb_connection structure in the
near future.  The gb_bundle structure's struct device should be used as
a replacement.

This patch moves the hid driver to use the bundle pointer instead of the
connection pointer.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
parent 1cb9e38c
...@@ -86,7 +86,7 @@ static int gb_hid_set_report(struct gb_hid *ghid, u8 report_type, u8 report_id, ...@@ -86,7 +86,7 @@ static int gb_hid_set_report(struct gb_hid *ghid, u8 report_type, u8 report_id,
ret = gb_operation_request_send_sync(operation); ret = gb_operation_request_send_sync(operation);
if (ret) { if (ret) {
dev_err(&operation->connection->dev, dev_err(&operation->connection->bundle->dev,
"failed to set report: %d\n", ret); "failed to set report: %d\n", ret);
} else { } else {
ret = len; ret = len;
...@@ -104,7 +104,7 @@ static int gb_hid_irq_handler(u8 type, struct gb_operation *op) ...@@ -104,7 +104,7 @@ static int gb_hid_irq_handler(u8 type, struct gb_operation *op)
struct gb_hid_input_report_request *request = op->request->payload; struct gb_hid_input_report_request *request = op->request->payload;
if (type != GB_HID_TYPE_IRQ_EVENT) { if (type != GB_HID_TYPE_IRQ_EVENT) {
dev_err(&connection->dev, dev_err(&connection->bundle->dev,
"unsupported unsolicited request\n"); "unsupported unsolicited request\n");
return -EINVAL; return -EINVAL;
} }
...@@ -403,7 +403,7 @@ static int gb_hid_init(struct gb_hid *ghid) ...@@ -403,7 +403,7 @@ static int gb_hid_init(struct gb_hid *ghid)
hid->driver_data = ghid; hid->driver_data = ghid;
hid->ll_driver = &gb_hid_ll_driver; hid->ll_driver = &gb_hid_ll_driver;
hid->dev.parent = &ghid->connection->dev; hid->dev.parent = &ghid->connection->bundle->dev;
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)
hid->hid_get_raw_report = gb_hid_get_raw_report; hid->hid_get_raw_report = gb_hid_get_raw_report;
hid->hid_output_raw_report = gb_hid_output_raw_report; hid->hid_output_raw_report = gb_hid_output_raw_report;
...@@ -412,7 +412,8 @@ static int gb_hid_init(struct gb_hid *ghid) ...@@ -412,7 +412,8 @@ static int gb_hid_init(struct gb_hid *ghid)
/* Set HID device's name */ /* Set HID device's name */
snprintf(hid->name, sizeof(hid->name), "%s %04hX:%04hX", snprintf(hid->name, sizeof(hid->name), "%s %04hX:%04hX",
dev_name(&ghid->connection->dev), hid->vendor, hid->product); dev_name(&ghid->connection->bundle->dev),
hid->vendor, hid->product);
return 0; return 0;
} }
......
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