summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-lgff.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-09-30 10:49:45 +0200
committerTakashi Iwai <tiwai@suse.de>2013-09-30 10:49:45 +0200
commit6ae405996ca4a656fbc939ed4f0a4c5b2f8925a7 (patch)
treeef7007442ea510ecd36f225957e251a8e6bd336e /drivers/hid/hid-lgff.c
parentALSA: hda - Enable internal mic on a Thinkpad machine with ALC283 (diff)
parentMerge remote-tracking branch 'asoc/fix/max98095' into asoc-linus (diff)
downloadlinux-6ae405996ca4a656fbc939ed4f0a4c5b2f8925a7.tar.xz
linux-6ae405996ca4a656fbc939ed4f0a4c5b2f8925a7.zip
Merge tag 'asoc-v3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.12 Nothing too exciting here, all driver specific except for the fix from Liam for DPCM systems which have both front and back end DAIs which is not yet used by anything in mainline.
Diffstat (limited to 'drivers/hid/hid-lgff.c')
-rw-r--r--drivers/hid/hid-lgff.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/hid/hid-lgff.c b/drivers/hid/hid-lgff.c
index d7ea8c845b40..e1394af0ae7b 100644
--- a/drivers/hid/hid-lgff.c
+++ b/drivers/hid/hid-lgff.c
@@ -128,27 +128,14 @@ static void hid_lgff_set_autocenter(struct input_dev *dev, u16 magnitude)
int lgff_init(struct hid_device* hid)
{
struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list);
- struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list;
struct input_dev *dev = hidinput->input;
- struct hid_report *report;
- struct hid_field *field;
const signed short *ff_bits = ff_joystick;
int error;
int i;
- /* Find the report to use */
- if (list_empty(report_list)) {
- hid_err(hid, "No output report found\n");
- return -1;
- }
-
/* Check that the report looks ok */
- report = list_entry(report_list->next, struct hid_report, list);
- field = report->field[0];
- if (!field) {
- hid_err(hid, "NULL field\n");
- return -1;
- }
+ if (!hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 7))
+ return -ENODEV;
for (i = 0; i < ARRAY_SIZE(devices); i++) {
if (dev->id.vendor == devices[i].idVendor &&