lkml.org 
[lkml]   [2012]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC ebeam PATCH v4 2/2] input: misc: New USB eBeam input driver.
Hi,

Le 23/08/2012 09:23, Oliver Neukum a écrit :
> On Thursday 23 August 2012 00:11:54 Yann Cantin wrote:
>> +static int ebeam_resume(struct usb_interface *intf)
>> +{
>> + struct ebeam_device *ebeam = usb_get_intfdata(intf);
>> + struct input_dev *input = ebeam->input;
>> + int result = 0;
>> +
>> + mutex_lock(&input->mutex);
>> + if (input->users)
>> + result = usb_submit_urb(ebeam->irq, GFP_NOIO);
>> + mutex_unlock(&input->mutex);
>> +
>> + return result;
>> +}
>> +
>> +static int ebeam_reset_resume(struct usb_interface *intf)
>> +{
>> + struct ebeam_device *ebeam = usb_get_intfdata(intf);
>> + struct input_dev *input = ebeam->input;
>> + int err = 0;
>> +
>> + /* restart IO if needed */
>> + mutex_lock(&input->mutex);
>> + if (input->users)
>> + err = usb_submit_urb(ebeam->irq, GFP_NOIO);
>> + mutex_unlock(&input->mutex);
>> +
>> + return err;
>> +}
>
> These functions are identical. You should unify them.

Removed reset_resume from the driver (optional, and not needed
for this hardware).

Thanks.

--
Yann Cantin
A4FEB47F
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-08-24 12:21    [W:0.080 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site