diff options
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-cp2112.c | 7 | ||||
-rw-r--r-- | drivers/hid/hid-picolcd_fb.c | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c index 8bbe3d0cbe5d..2310c96ccf4a 100644 --- a/drivers/hid/hid-cp2112.c +++ b/drivers/hid/hid-cp2112.c @@ -16,7 +16,8 @@ * https://www.silabs.com/documents/public/application-notes/an495-cp2112-interface-specification.pdf */ -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> +#include <linux/gpio/machine.h> #include <linux/gpio/driver.h> #include <linux/hid.h> #include <linux/hidraw.h> @@ -1195,7 +1196,9 @@ static int __maybe_unused cp2112_allocate_irq(struct cp2112_device *dev, return -EINVAL; dev->desc[pin] = gpiochip_request_own_desc(&dev->gc, pin, - "HID/I2C:Event", 0); + "HID/I2C:Event", + GPIO_ACTIVE_HIGH, + GPIOD_IN); if (IS_ERR(dev->desc[pin])) { dev_err(dev->gc.parent, "Failed to request GPIO\n"); return PTR_ERR(dev->desc[pin]); diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-picolcd_fb.c index 6897e14e7cb7..e162a668fb7e 100644 --- a/drivers/hid/hid-picolcd_fb.c +++ b/drivers/hid/hid-picolcd_fb.c @@ -512,10 +512,8 @@ int picolcd_init_framebuffer(struct picolcd_data *data) sizeof(struct fb_deferred_io) + sizeof(struct picolcd_fb_data) + PICOLCDFB_SIZE, dev); - if (info == NULL) { - dev_err(dev, "failed to allocate a framebuffer\n"); + if (!info) goto err_nomem; - } info->fbdefio = info->par; *info->fbdefio = picolcd_fb_defio; |