Commit 6fd18202 authored by Benjamin Tissoires's avatar Benjamin Tissoires Committed by Jiri Kosina

HID: remove hid_output_raw_report transport implementations

Nobody calls hid_output_raw_report anymore, and nobody should.
We can now remove the various implementation in the different
transport drivers and the declarations.
Reviewed-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent e534a935
...@@ -587,19 +587,6 @@ static int i2c_hid_output_raw_report(struct hid_device *hid, __u8 *buf, ...@@ -587,19 +587,6 @@ static int i2c_hid_output_raw_report(struct hid_device *hid, __u8 *buf,
return ret; return ret;
} }
static int __i2c_hid_output_raw_report(struct hid_device *hid, __u8 *buf,
size_t count, unsigned char report_type)
{
struct i2c_client *client = hid->driver_data;
struct i2c_hid *ihid = i2c_get_clientdata(client);
bool data = true; /* SET_REPORT */
if (report_type == HID_OUTPUT_REPORT)
data = le16_to_cpu(ihid->hdesc.wMaxOutputLength) == 0;
return i2c_hid_output_raw_report(hid, buf, count, report_type, data);
}
static int i2c_hid_output_report(struct hid_device *hid, __u8 *buf, static int i2c_hid_output_report(struct hid_device *hid, __u8 *buf,
size_t count) size_t count)
{ {
...@@ -1025,7 +1012,6 @@ static int i2c_hid_probe(struct i2c_client *client, ...@@ -1025,7 +1012,6 @@ static int i2c_hid_probe(struct i2c_client *client,
hid->driver_data = client; hid->driver_data = client;
hid->ll_driver = &i2c_hid_ll_driver; hid->ll_driver = &i2c_hid_ll_driver;
hid->hid_output_raw_report = __i2c_hid_output_raw_report;
hid->dev.parent = &client->dev; hid->dev.parent = &client->dev;
ACPI_COMPANION_SET(&hid->dev, ACPI_COMPANION(&client->dev)); ACPI_COMPANION_SET(&hid->dev, ACPI_COMPANION(&client->dev));
hid->bus = BUS_I2C; hid->bus = BUS_I2C;
......
...@@ -400,7 +400,6 @@ static int uhid_dev_create(struct uhid_device *uhid, ...@@ -400,7 +400,6 @@ static int uhid_dev_create(struct uhid_device *uhid,
hid->uniq[63] = 0; hid->uniq[63] = 0;
hid->ll_driver = &uhid_hid_driver; hid->ll_driver = &uhid_hid_driver;
hid->hid_output_raw_report = uhid_hid_output_raw;
hid->bus = ev->u.create.bus; hid->bus = ev->u.create.bus;
hid->vendor = ev->u.create.vendor; hid->vendor = ev->u.create.vendor;
hid->product = ev->u.create.product; hid->product = ev->u.create.product;
......
...@@ -950,17 +950,6 @@ static int usbhid_output_report(struct hid_device *hid, __u8 *buf, size_t count) ...@@ -950,17 +950,6 @@ static int usbhid_output_report(struct hid_device *hid, __u8 *buf, size_t count)
return ret; return ret;
} }
static int usbhid_output_raw_report(struct hid_device *hid, __u8 *buf,
size_t count, unsigned char report_type)
{
struct usbhid_device *usbhid = hid->driver_data;
if (usbhid->urbout && report_type != HID_FEATURE_REPORT)
return usbhid_output_report(hid, buf, count);
return usbhid_set_raw_report(hid, buf[0], buf, count, report_type);
}
static void usbhid_restart_queues(struct usbhid_device *usbhid) static void usbhid_restart_queues(struct usbhid_device *usbhid)
{ {
if (usbhid->urbout && !test_bit(HID_OUT_RUNNING, &usbhid->iofl)) if (usbhid->urbout && !test_bit(HID_OUT_RUNNING, &usbhid->iofl))
...@@ -1294,7 +1283,6 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id * ...@@ -1294,7 +1283,6 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *
usb_set_intfdata(intf, hid); usb_set_intfdata(intf, hid);
hid->ll_driver = &usb_hid_driver; hid->ll_driver = &usb_hid_driver;
hid->hid_output_raw_report = usbhid_output_raw_report;
hid->ff_init = hid_pidff_init; hid->ff_init = hid_pidff_init;
#ifdef CONFIG_USB_HIDDEV #ifdef CONFIG_USB_HIDDEV
hid->hiddev_connect = hiddev_connect; hid->hiddev_connect = hiddev_connect;
......
...@@ -510,9 +510,6 @@ struct hid_device { /* device report descriptor */ ...@@ -510,9 +510,6 @@ struct hid_device { /* device report descriptor */
struct hid_usage *, __s32); struct hid_usage *, __s32);
void (*hiddev_report_event) (struct hid_device *, struct hid_report *); void (*hiddev_report_event) (struct hid_device *, struct hid_report *);
/* handler for raw output data, used by hidraw */
int (*hid_output_raw_report) (struct hid_device *, __u8 *, size_t, unsigned char);
/* debugging support via debugfs */ /* debugging support via debugfs */
unsigned short debug; unsigned short debug;
struct dentry *debug_dir; struct dentry *debug_dir;
...@@ -1019,22 +1016,6 @@ static inline int hid_hw_output_report(struct hid_device *hdev, __u8 *buf, ...@@ -1019,22 +1016,6 @@ static inline int hid_hw_output_report(struct hid_device *hdev, __u8 *buf,
return -ENOSYS; return -ENOSYS;
} }
/**
* hid_output_raw_report - send an output or a feature report to the device
*
* @hdev: hid device
* @buf: raw data to transfer
* @len: length of buf
* @report_type: HID_FEATURE_REPORT or HID_OUTPUT_REPORT
*
* @return: count of data transfered, negative if error
*/
static inline int hid_output_raw_report(struct hid_device *hdev, __u8 *buf,
size_t len, unsigned char report_type)
{
return hdev->hid_output_raw_report(hdev, buf, len, report_type);
}
/** /**
* hid_hw_idle - send idle request to device * hid_hw_idle - send idle request to device
* *
......
...@@ -382,18 +382,6 @@ static int hidp_output_report(struct hid_device *hid, __u8 *data, size_t count) ...@@ -382,18 +382,6 @@ static int hidp_output_report(struct hid_device *hid, __u8 *data, size_t count)
data, count); data, count);
} }
static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data,
size_t count, unsigned char report_type)
{
if (report_type == HID_OUTPUT_REPORT) {
return hidp_output_report(hid, data, count);
} else if (report_type != HID_FEATURE_REPORT) {
return -EINVAL;
}
return hidp_set_raw_report(hid, data[0], data, count, report_type);
}
static int hidp_raw_request(struct hid_device *hid, unsigned char reportnum, static int hidp_raw_request(struct hid_device *hid, unsigned char reportnum,
__u8 *buf, size_t len, unsigned char rtype, __u8 *buf, size_t len, unsigned char rtype,
int reqtype) int reqtype)
...@@ -776,8 +764,6 @@ static int hidp_setup_hid(struct hidp_session *session, ...@@ -776,8 +764,6 @@ static int hidp_setup_hid(struct hidp_session *session,
hid->dev.parent = &session->conn->hcon->dev; hid->dev.parent = &session->conn->hcon->dev;
hid->ll_driver = &hidp_hid_driver; hid->ll_driver = &hidp_hid_driver;
hid->hid_output_raw_report = hidp_output_raw_report;
/* True if device is blacklisted in drivers/hid/hid-core.c */ /* True if device is blacklisted in drivers/hid/hid-core.c */
if (hid_ignore(hid)) { if (hid_ignore(hid)) {
hid_destroy_device(session->hid); hid_destroy_device(session->hid);
......
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