Re: [PATCH] hid: sony: Use kernel allocated buffers for HID reports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 11, 2014 at 2:04 PM, Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:
> Hi Frank,
>>  static spinlock_t sony_dev_list_lock;
>>  static LIST_HEAD(sony_device_list);
>>  static DEFINE_IDA(sony_device_id_allocator);
>> @@ -811,6 +814,7 @@ struct sony_sc {
>>       struct work_struct state_worker;
>>       struct power_supply battery;
>>       int device_id;
>> +     __u8 *output_report_dmabuf;
>
> Just to confirm as I haven't looked at the entire driver: there is no
> possibility of 2 requests being submitted at the same time so that one
> will overwrite other's data?
>
> --
> Dmitry

Output reports are sent using a work request submitted to the kernel
work queue with schedule_work(), so using one buffer is safe since the
work_struct can't be scheduled multiple times or simultaneously
execute across multiple cores.

The other comments you had are addressed in v2 of the patch.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux