diff mbox

[v2,4/6] HID: uclogic: apply quirk NO_EMPTY_INPUT

Message ID 1424977049-18648-5-git-send-email-benjamin.tissoires@redhat.com (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Benjamin Tissoires Feb. 26, 2015, 6:57 p.m. UTC
NO_EMPTY_INPUT is useful when MULTI_INPUT is set. It prevents to create
empty input nodes that user space does not know what to do with.

It does not seem to be required at the moment, this is just a preventive
patch. This check is only made during the plug of the device, so it does
not hurt to have it.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---

New in v2

 drivers/hid/hid-uclogic.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Nikolai Kondrashov March 1, 2015, 6:07 p.m. UTC | #1
On 02/26/2015 08:57 PM, Benjamin Tissoires wrote:
> NO_EMPTY_INPUT is useful when MULTI_INPUT is set. It prevents to create
> empty input nodes that user space does not know what to do with.
>
> It does not seem to be required at the moment, this is just a preventive
> patch. This check is only made during the plug of the device, so it does
> not hurt to have it.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
>
> New in v2
>
>   drivers/hid/hid-uclogic.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hid/hid-uclogic.c b/drivers/hid/hid-uclogic.c
> index 90e2612..ada8a94 100644
> --- a/drivers/hid/hid-uclogic.c
> +++ b/drivers/hid/hid-uclogic.c
> @@ -868,6 +868,7 @@ static int uclogic_probe(struct hid_device *hdev,
>   	 * than the pen, so use QUIRK_MULTI_INPUT for all tablets.
>   	 */
>   	hdev->quirks |= HID_QUIRK_MULTI_INPUT;
> +	hdev->quirks |= HID_QUIRK_NO_EMPTY_INPUT;
>
>   	/* Allocate and assign driver data */
>   	drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL);

This seems safe and fine as a preventive.

Reviewed-by: Nikolai Kondrashov <spbnick@gmail.com>

Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/hid/hid-uclogic.c b/drivers/hid/hid-uclogic.c
index 90e2612..ada8a94 100644
--- a/drivers/hid/hid-uclogic.c
+++ b/drivers/hid/hid-uclogic.c
@@ -868,6 +868,7 @@  static int uclogic_probe(struct hid_device *hdev,
 	 * than the pen, so use QUIRK_MULTI_INPUT for all tablets.
 	 */
 	hdev->quirks |= HID_QUIRK_MULTI_INPUT;
+	hdev->quirks |= HID_QUIRK_NO_EMPTY_INPUT;
 
 	/* Allocate and assign driver data */
 	drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL);