hid-u2fzero.c (448cc2fb3a7b327823a9afd374808c37b8e6194f) hid-u2fzero.c (f83baa0cb6cfc92ebaf7f9d3a99d7e34f2e77a8a)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * U2F Zero LED and RNG driver
4 *
5 * Copyright 2018 Andrej Shadura <andrew@shadura.me>
6 * Loosely based on drivers/hid/hid-led.c
7 * and drivers/usb/misc/chaoskey.c
8 *

--- 297 unchanged lines hidden (view full) ---

306
307static int u2fzero_probe(struct hid_device *hdev,
308 const struct hid_device_id *id)
309{
310 struct u2fzero_device *dev;
311 unsigned int minor;
312 int ret;
313
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * U2F Zero LED and RNG driver
4 *
5 * Copyright 2018 Andrej Shadura <andrew@shadura.me>
6 * Loosely based on drivers/hid/hid-led.c
7 * and drivers/usb/misc/chaoskey.c
8 *

--- 297 unchanged lines hidden (view full) ---

306
307static int u2fzero_probe(struct hid_device *hdev,
308 const struct hid_device_id *id)
309{
310 struct u2fzero_device *dev;
311 unsigned int minor;
312 int ret;
313
314 if (!hid_is_using_ll_driver(hdev, &usb_hid_driver))
314 if (!hid_is_usb(hdev))
315 return -EINVAL;
316
317 dev = devm_kzalloc(&hdev->dev, sizeof(*dev), GFP_KERNEL);
318 if (dev == NULL)
319 return -ENOMEM;
320
321 dev->hw_revision = id->driver_data;
322

--- 83 unchanged lines hidden ---
315 return -EINVAL;
316
317 dev = devm_kzalloc(&hdev->dev, sizeof(*dev), GFP_KERNEL);
318 if (dev == NULL)
319 return -ENOMEM;
320
321 dev->hw_revision = id->driver_data;
322

--- 83 unchanged lines hidden ---