diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-01-15 09:46:14 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-01-15 09:46:14 -0800 |
commit | 0c49cd295d42d0032af11d55e2140dbec11dc8d0 (patch) | |
tree | 1e7d0e50b6b6d6e4de1fb6bb0b6d856c3932da58 /drivers/input | |
parent | 0c3e99437a66e4c869c60c2398449e6d98f3a988 (diff) | |
parent | eaa27f34e91a14cdceed26ed6c6793ec1d186115 (diff) |
Merge tag 'v3.19-rc4' into next
Merge with mainline to bring in the latest thermal and other changes.
Diffstat (limited to 'drivers/input')
116 files changed, 501 insertions, 304 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 8d4c6ca781f..e7cee3880b7 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -460,7 +460,7 @@ static int evdev_open(struct inode *inode, struct file *file) err_free_client: evdev_detach_client(evdev, client); - kfree(client); + kvfree(client); return error; } diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 36281eeabb1..3aa2f3f3da5 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -209,6 +209,7 @@ static const struct xpad_device { { 0x24c6, 0x5501, "Hori Real Arcade Pro VX-SA", 0, XTYPE_XBOX360 }, { 0x24c6, 0x5506, "Hori SOULCALIBUR V Stick", 0, XTYPE_XBOX360 }, { 0x24c6, 0x5b02, "Thrustmaster, Inc. GPX Controller", 0, XTYPE_XBOX360 }, + { 0x24c6, 0x5b03, "Thrustmaster Ferrari 458 Racing Wheel", 0, XTYPE_XBOX360 }, { 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX }, { 0x0000, 0x0000, "Generic X-Box pad", 0, XTYPE_UNKNOWN } }; @@ -292,6 +293,7 @@ static const signed short xpad_abs_triggers[] = { static struct usb_device_id xpad_table[] = { { USB_INTERFACE_INFO('X', 'B', 0) }, /* X-Box USB-IF not approved class */ + XPAD_XBOX360_VENDOR(0x044f), /* Thrustmaster X-Box 360 controllers */ XPAD_XBOX360_VENDOR(0x045e), /* Microsoft X-Box 360 controllers */ XPAD_XBOXONE_VENDOR(0x045e), /* Microsoft X-Box One controllers */ XPAD_XBOX360_VENDOR(0x046d), /* Logitech X-Box 360 style controllers */ @@ -1177,9 +1179,19 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id } ep_irq_in = &intf->cur_altsetting->endpoint[1].desc; - usb_fill_bulk_urb(xpad->bulk_out, udev, - usb_sndbulkpipe(udev, ep_irq_in->bEndpointAddress), - xpad->bdata, XPAD_PKT_LEN, xpad_bulk_out, xpad); + if (usb_endpoint_is_bulk_out(ep_irq_in)) { + usb_fill_bulk_urb(xpad->bulk_out, udev, + usb_sndbulkpipe(udev, + ep_irq_in->bEndpointAddress), + xpad->bdata, XPAD_PKT_LEN, + xpad_bulk_out, xpad); + } else { + usb_fill_int_urb(xpad->bulk_out, udev, + usb_sndintpipe(udev, + ep_irq_in->bEndpointAddress), + xpad->bdata, XPAD_PKT_LEN, + xpad_bulk_out, xpad, 0); + } /* * Submit the int URB immediately rather than waiting for open diff --git a/drivers/input/keyboard/adp5520-keys.c b/drivers/input/keyboard/adp5520-keys.c index 7f4a8b58efc..db1004dad10 100644 --- a/drivers/input/keyboard/adp5520-keys.c +++ b/drivers/input/keyboard/adp5520-keys.c @@ -184,7 +184,6 @@ static int adp5520_keys_remove(struct platform_device *pdev) static struct platform_driver adp5520_keys_driver = { .driver = { .name = "adp5520-keys", - .owner = THIS_MODULE, }, .probe = adp5520_keys_probe, .remove = adp5520_keys_remove, diff --git a/drivers/input/keyboard/adp5588-keys.c b/drivers/input/keyboard/adp5588-keys.c index 728133ec6d7..21a62d0fa76 100644 --- a/drivers/input/keyboard/adp5588-keys.c +++ b/drivers/input/keyboard/adp5588-keys.c @@ -251,9 +251,7 @@ static void adp5588_gpio_remove(struct adp5588_kpad *kpad) dev_warn(dev, "teardown failed %d\n", error); } - error = gpiochip_remove(&kpad->gc); - if (error) - dev_warn(dev, "gpiochip_remove failed %d\n", error); + gpiochip_remove(&kpad->gc); } #else static inline int adp5588_gpio_add(struct adp5588_kpad *kpad) diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c index 6329549bf6a..a45267729df 100644 --- a/drivers/input/keyboard/adp5589-keys.c +++ b/drivers/input/keyboard/adp5589-keys.c @@ -567,9 +567,7 @@ static void adp5589_gpio_remove(struct adp5589_kpad *kpad) dev_warn(dev, "teardown failed %d\n", error); } - error = gpiochip_remove(&kpad->gc); - if (error) - dev_warn(dev, "gpiochip_remove failed %d\n", error); + gpiochip_remove(&kpad->gc); } #else static inline int adp5589_gpio_add(struct adp5589_kpad *kpad) diff --git a/drivers/input/keyboard/amikbd.c b/drivers/input/keyboard/amikbd.c index 3196f2d29ad..e04a3b4e55d 100644 --- a/drivers/input/keyboard/amikbd.c +++ b/drivers/input/keyboard/amikbd.c @@ -268,7 +268,6 @@ static struct platform_driver amikbd_driver = { .remove = __exit_p(amikbd_remove), .driver = { .name = "amiga-keyboard", - .owner = THIS_MODULE, }, }; diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c index e6d46c5994d..81b07dddae8 100644 --- a/drivers/input/keyboard/bf54x-keys.c +++ b/drivers/input/keyboard/bf54x-keys.c @@ -385,7 +385,6 @@ static int bfin_kpad_resume(struct platform_device *pdev) static struct platform_driver bfin_kpad_device_driver = { .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, }, .probe = bfin_kpad_probe, .remove = bfin_kpad_remove, diff --git a/drivers/input/keyboard/clps711x-keypad.c b/drivers/input/keyboard/clps711x-keypad.c index 552b65c6e6b..27ef29f8fe6 100644 --- a/drivers/input/keyboard/clps711x-keypad.c +++ b/drivers/input/keyboard/clps711x-keypad.c @@ -194,7 +194,6 @@ MODULE_DEVICE_TABLE(of, clps711x_keypad_of_match); static struct platform_driver clps711x_keypad_driver = { .driver = { .name = "clps711x-keypad", - .owner = THIS_MODULE, .of_match_table = clps711x_keypad_of_match, }, .probe = clps711x_keypad_probe, diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c index 1e83ef99098..ffa989f2c78 100644 --- a/drivers/input/keyboard/cros_ec_keyb.c +++ b/drivers/input/keyboard/cros_ec_keyb.c @@ -157,7 +157,7 @@ static int cros_ec_keyb_get_state(struct cros_ec_keyb *ckdev, uint8_t *kb_state) .insize = ckdev->cols, }; - return ckdev->ec->cmd_xfer(ckdev->ec, &msg); + return cros_ec_cmd_xfer(ckdev->ec, &msg); } static irqreturn_t cros_ec_keyb_irq(int irq, void *data) diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c index 1559dc1cf95..f363d1d2907 100644 --- a/drivers/input/keyboard/davinci_keyscan.c +++ b/drivers/input/keyboard/davinci_keyscan.c @@ -322,7 +322,6 @@ static int davinci_ks_remove(struct platform_device *pdev) static struct platform_driver davinci_ks_driver = { .driver = { .name = "davinci_keyscan", - .owner = THIS_MODULE, }, .remove = davinci_ks_remove, }; diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c index e59876212b8..f77b295e012 100644 --- a/drivers/input/keyboard/ep93xx_keypad.c +++ b/drivers/input/keyboard/ep93xx_keypad.c @@ -373,7 +373,6 @@ static int ep93xx_keypad_remove(struct platform_device *pdev) static struct platform_driver ep93xx_keypad_driver = { .driver = { .name = "ep93xx-keypad", - .owner = THIS_MODULE, .pm = &ep93xx_keypad_pm_ops, }, .probe = ep93xx_keypad_probe, diff --git a/drivers/input/keyboard/goldfish_events.c b/drivers/input/keyboard/goldfish_events.c index 69e85476337..907e4e278fc 100644 --- a/drivers/input/keyboard/goldfish_events.c +++ b/drivers/input/keyboard/goldfish_events.c @@ -181,7 +181,6 @@ static int events_probe(struct platform_device *pdev) static struct platform_driver events_driver = { .probe = events_probe, .driver = { - .owner = THIS_MODULE, .name = "goldfish_events", }, }; diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index eefd976ab4e..883d6aed5b9 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -840,7 +840,6 @@ static struct platform_driver gpio_keys_device_driver = { .remove = gpio_keys_remove, .driver = { .name = "gpio-keys", - .owner = THIS_MODULE, .pm = &gpio_keys_pm_ops, .of_match_table = of_match_ptr(gpio_keys_of_match), } diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c index 432d36395f3..90df4df58b0 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c @@ -23,10 +23,9 @@ #include <linux/ioport.h> #include <linux/platform_device.h> #include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio_keys.h> -#include <linux/of.h> -#include <linux/of_platform.h> -#include <linux/of_gpio.h> +#include <linux/property.h> #define DRV_NAME "gpio-keys-polled" @@ -51,15 +50,14 @@ static void gpio_keys_polled_check_state(struct input_dev *input, int state; if (bdata->can_sleep) - state = !!gpio_get_value_cansleep(button->gpio); + state = !!gpiod_get_value_cansleep(button->gpiod); else - state = !!gpio_get_value(button->gpio); + state = !!gpiod_get_value(button->gpiod); if (state != bdata->last_state) { unsigned int type = button->type ?: EV_KEY; - input_event(input, type, button->code, - !!(state ^ button->active_low)); + input_event(input, type, button->code, state); input_sync(input); bdata->count = 0; bdata->last_state = state; @@ -102,21 +100,15 @@ static void gpio_keys_polled_close(struct input_polled_dev *dev) pdata->disable(bdev->dev); } -#ifdef CONFIG_OF static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct device *dev) { - struct device_node *node, *pp; struct gpio_keys_platform_data *pdata; struct gpio_keys_button *button; + struct fwnode_handle *child; int error; int nbuttons; - int i; - - node = dev->of_node; - if (!node) - return NULL; - nbuttons = of_get_child_count(node); + nbuttons = device_get_child_node_count(dev); if (nbuttons == 0) return NULL; @@ -126,52 +118,44 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct return ERR_PTR(-ENOMEM); pdata->buttons = (struct gpio_keys_button *)(pdata + 1); - pdata->nbuttons = nbuttons; - pdata->rep = !!of_get_property(node, "autorepeat", NULL); - of_property_read_u32(node, "poll-interval", &pdata->poll_interval); + pdata->rep = device_property_present(dev, "autorepeat"); + device_property_read_u32(dev, "poll-interval", &pdata->poll_interval); - i = 0; - for_each_child_of_node(node, pp) { - int gpio; - enum of_gpio_flags flags; + device_for_each_child_node(dev, child) { + struct gpio_desc *desc; - if (!of_find_property(pp, "gpios", NULL)) { - pdata->nbuttons--; - dev_warn(dev, "Found button without gpios\n"); - continue; - } - - gpio = of_get_gpio_flags(pp, 0, &flags); - if (gpio < 0) { - error = gpio; + desc = devm_get_gpiod_from_child(dev, child); + if (IS_ERR(desc)) { + error = PTR_ERR(desc); if (error != -EPROBE_DEFER) dev_err(dev, "Failed to get gpio flags, error: %d\n", error); + fwnode_handle_put(child); return ERR_PTR(error); } - button = &pdata->buttons[i++]; - - button->gpio = gpio; - button->active_low = flags & OF_GPIO_ACTIVE_LOW; + button = &pdata->buttons[pdata->nbuttons++]; + button->gpiod = desc; - if (of_property_read_u32(pp, "linux,code", &button->code)) { - dev_err(dev, "Button without keycode: 0x%x\n", - button->gpio); + if (fwnode_property_read_u32(child, "linux,code", &button->code)) { + dev_err(dev, "Button without keycode: %d\n", + pdata->nbuttons - 1); + fwnode_handle_put(child); return ERR_PTR(-EINVAL); } - button->desc = of_get_property(pp, "label", NULL); + fwnode_property_read_string(child, "label", &button->desc); - if (of_property_read_u32(pp, "linux,input-type", &button->type)) + if (fwnode_property_read_u32(child, "linux,input-type", + &button->type)) button->type = EV_KEY; - button->wakeup = !!of_get_property(pp, "gpio-key,wakeup", NULL); + button->wakeup = fwnode_property_present(child, "gpio-key,wakeup"); - if (of_property_read_u32(pp, "debounce-interval", - &button->debounce_interval)) + if (fwnode_property_read_u32(child, "debounce-interval", + &button->debounce_interval)) button->debounce_interval = 5; } @@ -187,15 +171,6 @@ static const struct of_device_id gpio_keys_polled_of_match[] = { }; MODULE_DEVICE_TABLE(of, gpio_keys_polled_of_match); -#else - -static inline struct gpio_keys_platform_data * -gpio_keys_polled_get_devtree_pdata(struct device *dev) -{ - return NULL; -} -#endif - static int gpio_keys_polled_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -259,7 +234,6 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) for (i = 0; i < pdata->nbuttons; i++) { struct gpio_keys_button *button = &pdata->buttons[i]; struct gpio_keys_button_data *bdata = &bdev->data[i]; - unsigned int gpio = button->gpio; unsigned int type = button->type ?: EV_KEY; if (button->wakeup) { @@ -267,15 +241,31 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) return -EINVAL; } - error = devm_gpio_request_one(&pdev->dev, gpio, GPIOF_IN, - button->desc ? : DRV_NAME); - if (error) { - dev_err(dev, "unable to claim gpio %u, err=%d\n", - gpio, error); - return error; + /* + * Legacy GPIO number so request the GPIO here and + * convert it to descriptor. + */ + if (!button->gpiod && gpio_is_valid(button->gpio)) { + unsigned flags = 0; + + if (button->active_low) + flags |= GPIOF_ACTIVE_LOW; + + error = devm_gpio_request_one(&pdev->dev, button->gpio, + flags, button->desc ? : DRV_NAME); + if (error) { + dev_err(dev, "unable to claim gpio %u, err=%d\n", + button->gpio, error); + return error; + } + + button->gpiod = gpio_to_desc(button->gpio); } - bdata->can_sleep = gpio_cansleep(gpio); + if (IS_ERR(button->gpiod)) + return PTR_ERR(button->gpiod); + + bdata->can_sleep = gpiod_cansleep(button->gpiod); bdata->last_state = -1; bdata->threshold = DIV_ROUND_UP(button->debounce_interval, pdata->poll_interval); @@ -307,8 +297,7 @@ static struct platform_driver gpio_keys_polled_driver = { .probe = gpio_keys_polled_probe, .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = of_match_ptr(gpio_keys_polled_of_match), + .of_match_table = gpio_keys_polled_of_match, }, }; module_platform_driver(gpio_keys_polled_driver); diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c index 610a8af795a..5b152f25a8e 100644 --- a/drivers/input/keyboard/hil_kbd.c +++ b/drivers/input/keyboard/hil_kbd.c @@ -473,7 +473,7 @@ static int hil_dev_connect(struct serio *serio, struct serio_driver *drv) if (error) goto bail1; - init_completion(&dev->cmd_done); + reinit_completion(&dev->cmd_done); serio_write(serio, 0); serio_write(serio, 0); serio_write(serio, HIL_PKT_CMD >> 8); @@ -482,7 +482,7 @@ static int hil_dev_connect(struct serio *serio, struct serio_driver *drv) if (error) goto bail1; - init_completion(&dev->cmd_done); + reinit_completion(&dev->cmd_done); serio_write(serio, 0); serio_write(serio, 0); serio_write(serio, HIL_PKT_CMD >> 8); @@ -491,7 +491,7 @@ static int hil_dev_connect(struct serio *serio, struct serio_driver *drv) if (error) goto bail1; - init_completion(&dev->cmd_done); + reinit_completion(&dev->cmd_done); serio_write(serio, 0); serio_write(serio, 0); serio_write(serio, HIL_PKT_CMD >> 8); diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index 3b681c8042a..2e855e6f356 100644 --- a/drivers/input/keyboard/imx_keypad.c +++ b/drivers/input/keyboard/imx_keypad.c @@ -579,7 +579,6 @@ static SIMPLE_DEV_PM_OPS(imx_kbd_pm_ops, imx_kbd_suspend, imx_kbd_resume); static struct platform_driver imx_keypad_driver = { .driver = { .name = "imx-keypad", - .owner = THIS_MODULE, .pm = &imx_kbd_pm_ops, .of_match_table = of_match_ptr(imx_keypad_of_match), }, diff --git a/drivers/input/keyboard/jornada680_kbd.c b/drivers/input/keyboard/jornada680_kbd.c index 0ba4428da24..80c81278ad2 100644 --- a/drivers/input/keyboard/jornada680_kbd.c +++ b/drivers/input/keyboard/jornada680_kbd.c @@ -237,7 +237,6 @@ static int jornada680kbd_probe(struct platform_device *pdev) static struct platform_driver jornada680kbd_driver = { .driver = { .name = "jornada680_kbd", - .owner = THIS_MODULE, }, .probe = jornada680kbd_probe, }; diff --git a/drivers/input/keyboard/jornada720_kbd.c b/drivers/input/keyboard/jornada720_kbd.c index cd729d485e9..421d9c55b0e 100644 --- a/drivers/input/keyboard/jornada720_kbd.c +++ b/drivers/input/keyboard/jornada720_kbd.c @@ -167,7 +167,6 @@ MODULE_ALIAS("platform:jornada720_kbd"); static struct platform_driver jornada720_kbd_driver = { .driver = { .name = "jornada720_kbd", - .owner = THIS_MODULE, }, .probe = jornada720_kbd_probe, .remove = jornada720_kbd_remove, diff --git a/drivers/input/keyboard/lpc32xx-keys.c b/drivers/input/keyboard/lpc32xx-keys.c index 9e9786d576c..265d641c40e 100644 --- a/drivers/input/keyboard/lpc32xx-keys.c +++ b/drivers/input/keyboard/lpc32xx-keys.c @@ -329,7 +329,6 @@ static struct platform_driver lpc32xx_kscan_driver = { .probe = lpc32xx_kscan_probe, .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, .pm = &lpc32xx_kscan_pm_ops, .of_match_table = lpc32xx_kscan_match, } diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c index e651fa692af..b370a59cb75 100644 --- a/drivers/input/keyboard/matrix_keypad.c +++ b/drivers/input/keyboard/matrix_keypad.c @@ -565,7 +565,6 @@ static struct platform_driver matrix_keypad_driver = { .remove = matrix_keypad_remove, .driver = { .name = "matrix-keypad", - .owner = THIS_MODULE, .pm = &matrix_keypad_pm_ops, .of_match_table = of_match_ptr(matrix_keypad_dt_match), }, diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index 63332e2f862..c7d5b1666fc 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c @@ -425,7 +425,6 @@ static SIMPLE_DEV_PM_OPS(ske_keypad_dev_pm_ops, static struct platform_driver ske_keypad_driver = { .driver = { .name = "nmk-ske-keypad", - .owner = THIS_MODULE, .pm = &ske_keypad_dev_pm_ops, }, .remove = ske_keypad_remove, diff --git a/drivers/input/keyboard/nspire-keypad.c b/drivers/input/keyboard/nspire-keypad.c index b31064981e9..7abfd34eb87 100644 --- a/drivers/input/keyboard/nspire-keypad.c +++ b/drivers/input/keyboard/nspire-keypad.c @@ -268,7 +268,6 @@ MODULE_DEVICE_TABLE(of, nspire_keypad_dt_match); static struct platform_driver nspire_keypad_driver = { .driver = { .name = "nspire-keypad", - .owner = THIS_MODULE, .of_match_table = nspire_keypad_dt_match, }, .probe = nspire_keypad_probe, diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index b1acc9852eb..7502e46165f 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c @@ -383,7 +383,6 @@ static struct platform_driver omap_kp_driver = { .resume = omap_kp_resume, .driver = { .name = "omap-keypad", - .owner = THIS_MODULE, }, }; module_platform_driver(omap_kp_driver); diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index 024b7bdffe5..b052afec9a1 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -460,7 +460,6 @@ static struct platform_driver omap4_keypad_driver = { .remove = omap4_keypad_remove, .driver = { .name = "omap4-keypad", - .owner = THIS_MODULE, .pm = &omap4_keypad_pm_ops, .of_match_table = omap_keypad_dt_match, }, diff --git a/drivers/input/keyboard/opencores-kbd.c b/drivers/input/keyboard/opencores-kbd.c index 62abe2c1667..f8502bb2917 100644 --- a/drivers/input/keyboard/opencores-kbd.c +++ b/drivers/input/keyboard/opencores-kbd.c @@ -70,7 +70,7 @@ static int opencores_kbd_probe(struct platform_device *pdev) opencores_kbd->addr = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(opencores_kbd->addr)) - error = PTR_ERR(opencores_kbd->addr); + return PTR_ERR(opencores_kbd->addr); input->name = pdev->name; input->phys = "opencores-kbd/input0"; diff --git a/drivers/input/keyboard/pmic8xxx-keypad.c b/drivers/input/keyboard/pmic8xxx-keypad.c index 80c6b0ef3fc..32580afecc2 100644 --- a/drivers/input/keyboard/pmic8xxx-keypad.c +++ b/drivers/input/keyboard/pmic8xxx-keypad.c @@ -687,7 +687,6 @@ static struct platform_driver pmic8xxx_kp_driver = { .probe = pmic8xxx_kp_probe, .driver = { .name = "pm8xxx-keypad", - .owner = THIS_MODULE, .pm = &pm8xxx_kp_pm_ops, .of_match_table = pm8xxx_match_table, }, diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index e08fc0ae913..a90d6bdc499 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c @@ -835,7 +835,6 @@ static struct platform_driver pxa27x_keypad_driver = { .driver = { .name = "pxa27x-keypad", .of_match_table = of_match_ptr(pxa27x_keypad_dt_match), - .owner = THIS_MODULE, .pm = &pxa27x_keypad_pm_ops, }, }; diff --git a/drivers/input/keyboard/pxa930_rotary.c b/drivers/input/keyboard/pxa930_rotary.c index 374ca0246c8..1cf5211fdda 100644 --- a/drivers/input/keyboard/pxa930_rotary.c +++ b/drivers/input/keyboard/pxa930_rotary.c @@ -189,7 +189,6 @@ static int pxa930_rotary_remove(struct platform_device *pdev) static struct platform_driver pxa930_rotary_driver = { .driver = { .name = "pxa930-rotary", - .owner = THIS_MODULE, }, .probe = pxa930_rotary_probe, .remove = pxa930_rotary_remove, diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c index 5e80fbf7b5e..6b9fdf6cf8e 100644 --- a/drivers/input/keyboard/samsung-keypad.c +++ b/drivers/input/keyboard/samsung-keypad.c @@ -463,7 +463,7 @@ static int samsung_keypad_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int samsung_keypad_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -602,7 +602,6 @@ static struct platform_driver samsung_keypad_driver = { .remove = samsung_keypad_remove, .driver = { .name = "samsung-keypad", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(samsung_keypad_dt_match), .pm = &samsung_keypad_pm_ops, }, diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c index 258af10e581..f42a543db04 100644 --- a/drivers/input/keyboard/spear-keyboard.c +++ b/drivers/input/keyboard/spear-keyboard.c @@ -385,7 +385,6 @@ static struct platform_driver spear_kbd_driver = { .remove = spear_kbd_remove, .driver = { .name = "keyboard", - .owner = THIS_MODULE, .pm = &spear_kbd_pm_ops, .of_match_table = of_match_ptr(spear_kbd_id_table), }, diff --git a/drivers/input/keyboard/stmpe-keypad.c b/drivers/input/keyboard/stmpe-keypad.c index 64514e64d55..fe6e3f22eed 100644 --- a/drivers/input/keyboard/stmpe-keypad.c +++ b/drivers/input/keyboard/stmpe-keypad.c @@ -89,7 +89,7 @@ static const struct stmpe_keypad_variant stmpe_keypad_variants[] = { .max_cols = 8, .max_rows = 12, .col_gpios = 0x0000ff, /* GPIO 0 - 7*/ - .row_gpios = 0x1fef00, /* GPIO 8-14, 16-20 */ + .row_gpios = 0x1f7f00, /* GPIO 8-14, 16-20 */ }, [STMPE2403] = { .auto_increment = true, diff --git a/drivers/input/keyboard/tc3589x-keypad.c b/drivers/input/keyboard/tc3589x-keypad.c index ad7abae6907..8ff612d160b 100644 --- a/drivers/input/keyboard/tc3589x-keypad.c +++ b/drivers/input/keyboard/tc3589x-keypad.c @@ -505,7 +505,6 @@ static SIMPLE_DEV_PM_OPS(tc3589x_keypad_dev_pm_ops, static struct platform_driver tc3589x_keypad_driver = { .driver = { .name = "tc3589x-keypad", - .owner = THIS_MODULE, .pm = &tc3589x_keypad_dev_pm_ops, }, .probe = tc3589x_keypad_probe, diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index 9757a58bc89..f97c73bd14f 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c @@ -822,7 +822,6 @@ static struct platform_driver tegra_kbc_driver = { .probe = tegra_kbc_probe, .driver = { .name = "tegra-kbc", - .owner = THIS_MODULE, .pm = &tegra_kbc_pm_ops, .of_match_table = tegra_kbc_of_match, }, diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c index c5a11700a1b..bbcccd67247 100644 --- a/drivers/input/keyboard/twl4030_keypad.c +++ b/drivers/input/keyboard/twl4030_keypad.c @@ -459,7 +459,6 @@ static struct platform_driver twl4030_kp_driver = { .probe = twl4030_kp_probe, .driver = { .name = "twl4030_keypad", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(twl4030_keypad_dt_match_table), }, }; diff --git a/drivers/input/keyboard/w90p910_keypad.c b/drivers/input/keyboard/w90p910_keypad.c index e8b9d94daae..a1ff69c5310 100644 --- a/drivers/input/keyboard/w90p910_keypad.c +++ b/drivers/input/keyboard/w90p910_keypad.c @@ -258,7 +258,6 @@ static struct platform_driver w90p910_keypad_driver = { .remove = w90p910_keypad_remove, .driver = { .name = "nuc900-kpi", - .owner = THIS_MODULE, }, }; module_platform_driver(w90p910_keypad_driver); diff --git a/drivers/input/misc/88pm80x_onkey.c b/drivers/input/misc/88pm80x_onkey.c index ee43e5b7c88..cf9908f1e5d 100644 --- a/drivers/input/misc/88pm80x_onkey.c +++ b/drivers/input/misc/88pm80x_onkey.c @@ -153,7 +153,6 @@ static int pm80x_onkey_remove(struct platform_device *pdev) static struct platform_driver pm80x_onkey_driver = { .driver = { .name = "88pm80x-onkey", - .owner = THIS_MODULE, .pm = &pm80x_onkey_pm_ops, }, .probe = pm80x_onkey_probe, diff --git a/drivers/input/misc/88pm860x_onkey.c b/drivers/input/misc/88pm860x_onkey.c index 3cbd1b30922..cc87443aa2e 100644 --- a/drivers/input/misc/88pm860x_onkey.c +++ b/drivers/input/misc/88pm860x_onkey.c @@ -136,7 +136,6 @@ static SIMPLE_DEV_PM_OPS(pm860x_onkey_pm_ops, pm860x_onkey_suspend, pm860x_onkey static struct platform_driver pm860x_onkey_driver = { .driver = { .name = "88pm860x-onkey", - .owner = THIS_MODULE, .pm = &pm860x_onkey_pm_ops, }, .probe = pm860x_onkey_probe, diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c index 95ef7dd6442..1f7e15ca5fb 100644 --- a/drivers/input/misc/ab8500-ponkey.c +++ b/drivers/input/misc/ab8500-ponkey.c @@ -123,7 +123,6 @@ static const struct of_device_id ab8500_ponkey_match[] = { static struct platform_driver ab8500_ponkey_driver = { .driver = { .name = "ab8500-poweron-key", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(ab8500_ponkey_match), }, .probe = ab8500_ponkey_probe, diff --git a/drivers/input/misc/arizona-haptics.c b/drivers/input/misc/arizona-haptics.c index ef2e281b0a4..4dbbed74c9e 100644 --- a/drivers/input/misc/arizona-haptics.c +++ b/drivers/input/misc/arizona-haptics.c @@ -225,7 +225,6 @@ static struct platform_driver arizona_haptics_driver = { .remove = arizona_haptics_remove, .driver = { .name = "arizona-haptics", - .owner = THIS_MODULE, }, }; module_platform_driver(arizona_haptics_driver); diff --git a/drivers/input/misc/bfin_rotary.c b/drivers/input/misc/bfin_rotary.c index e69d9bcb37e..3f435157937 100644 --- a/drivers/input/misc/bfin_rotary.c +++ b/drivers/input/misc/bfin_rotary.c @@ -256,7 +256,6 @@ static struct platform_driver bfin_rotary_device_driver = { .remove = bfin_rotary_remove, .driver = { .name = "bfin-rotary", - .owner = THIS_MODULE, #ifdef CONFIG_PM .pm = &bfin_rotary_pm_ops, #endif diff --git a/drivers/input/misc/cobalt_btns.c b/drivers/input/misc/cobalt_btns.c index 3e11510ff82..fbe72afc934 100644 --- a/drivers/input/misc/cobalt_btns.c +++ b/drivers/input/misc/cobalt_btns.c @@ -157,7 +157,6 @@ static struct platform_driver cobalt_buttons_driver = { .remove = cobalt_buttons_remove, .driver = { .name = "Cobalt buttons", - .owner = THIS_MODULE, }, }; module_platform_driver(cobalt_buttons_driver); diff --git a/drivers/input/misc/da9052_onkey.c b/drivers/input/misc/da9052_onkey.c index 184c8f21ab5..266e07fdc18 100644 --- a/drivers/input/misc/da9052_onkey.c +++ b/drivers/input/misc/da9052_onkey.c @@ -149,7 +149,6 @@ static struct platform_driver da9052_onkey_driver = { .remove = da9052_onkey_remove, .driver = { .name = "da9052-onkey", - .owner = THIS_MODULE, }, }; module_platform_driver(da9052_onkey_driver); diff --git a/drivers/input/misc/da9055_onkey.c b/drivers/input/misc/da9055_onkey.c index 4765799fef7..3251a9693f4 100644 --- a/drivers/input/misc/da9055_onkey.c +++ b/drivers/input/misc/da9055_onkey.c @@ -157,7 +157,6 @@ static struct platform_driver da9055_onkey_driver = { .remove = da9055_onkey_remove, .driver = { .name = "da9055-onkey", - .owner = THIS_MODULE, }, }; diff --git a/drivers/input/misc/dm355evm_keys.c b/drivers/input/misc/dm355evm_keys.c index 0eba94f581d..b6b7bd4e546 100644 --- a/drivers/input/misc/dm355evm_keys.c +++ b/drivers/input/misc/dm355evm_keys.c @@ -263,7 +263,6 @@ static struct platform_driver dm355evm_keys_driver = { .probe = dm355evm_keys_probe, .remove = dm355evm_keys_remove, .driver = { - .owner = THIS_MODULE, .name = "dm355evm_keys", }, }; diff --git a/drivers/input/misc/gpio-beeper.c b/drivers/input/misc/gpio-beeper.c index 8886af63eae..4817c5f0c3e 100644 --- a/drivers/input/misc/gpio-beeper.c +++ b/drivers/input/misc/gpio-beeper.c @@ -112,7 +112,6 @@ MODULE_DEVICE_TABLE(of, gpio_beeper_of_match); static struct platform_driver gpio_beeper_platform_driver = { .driver = { .name = BEEPER_MODNAME, - .owner = THIS_MODULE, .of_match_table = of_match_ptr(gpio_beeper_of_match), }, .probe = gpio_beeper_probe, diff --git a/drivers/input/misc/gpio_tilt_polled.c b/drivers/input/misc/gpio_tilt_polled.c index 1a81d911522..f103b99d185 100644 --- a/drivers/input/misc/gpio_tilt_polled.c +++ b/drivers/input/misc/gpio_tilt_polled.c @@ -199,7 +199,6 @@ static struct platform_driver gpio_tilt_polled_driver = { .remove = gpio_tilt_polled_remove, .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, }, }; diff --git a/drivers/input/misc/ideapad_slidebar.c b/drivers/input/misc/ideapad_slidebar.c index edfd6239f13..b0acb878d1c 100644 --- a/drivers/input/misc/ideapad_slidebar.c +++ b/drivers/input/misc/ideapad_slidebar.c @@ -272,7 +272,6 @@ static int ideapad_remove(struct platform_device *pdev) static struct platform_driver slidebar_drv = { .driver = { .name = "ideapad_slidebar", - .owner = THIS_MODULE, }, .remove = ideapad_remove, }; diff --git a/drivers/input/misc/ims-pcu.c b/drivers/input/misc/ims-pcu.c index 69caee906ec..ac1fa5f4458 100644 --- a/drivers/input/misc/ims-pcu.c +++ b/drivers/input/misc/ims-pcu.c @@ -1381,7 +1381,7 @@ static ssize_t ims_pcu_ofn_reg_addr_store(struct device *dev, pcu->ofn_reg_addr = value; mutex_unlock(&pcu->cmd_mutex); - return error ?: count; + return count; } static DEVICE_ATTR(reg_addr, S_IRUGO | S_IWUSR, diff --git a/drivers/input/misc/ixp4xx-beeper.c b/drivers/input/misc/ixp4xx-beeper.c index ed8e5e8449d..1fe149f3def 100644 --- a/drivers/input/misc/ixp4xx-beeper.c +++ b/drivers/input/misc/ixp4xx-beeper.c @@ -168,7 +168,6 @@ static void ixp4xx_spkr_shutdown(struct platform_device *dev) static struct platform_driver ixp4xx_spkr_platform_driver = { .driver = { .name = "ixp4xx-beeper", - .owner = THIS_MODULE, }, .probe = ixp4xx_spkr_probe, .remove = ixp4xx_spkr_remove, diff --git a/drivers/input/misc/m68kspkr.c b/drivers/input/misc/m68kspkr.c index def21dc8452..312d6362303 100644 --- a/drivers/input/misc/m68kspkr.c +++ b/drivers/input/misc/m68kspkr.c @@ -100,7 +100,6 @@ static void m68kspkr_shutdown(struct platform_device *dev) static struct platform_driver m68kspkr_platform_driver = { .driver = { .name = "m68kspkr", - .owner = THIS_MODULE, }, .probe = m68kspkr_probe, .remove = m68kspkr_remove, diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c index 0ee3e8b45e8..39e930c10eb 100644 --- a/drivers/input/misc/max77693-haptic.c +++ b/drivers/input/misc/max77693-haptic.c @@ -152,7 +152,7 @@ static void max77693_haptic_disable(struct max77693_haptic *haptic) { int error; - if (haptic->enabled) + if (!haptic->enabled) return; error = max77693_haptic_configure(haptic, false); @@ -194,7 +194,7 @@ static int max77693_haptic_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect) { struct max77693_haptic *haptic = input_get_drvdata(dev); - uint64_t period_mag_multi; + u64 period_mag_multi; haptic->magnitude = effect->u.rumble.strong_magnitude; if (!haptic->magnitude) @@ -205,8 +205,7 @@ static int max77693_haptic_play_effect(struct input_dev *dev, void *data, * The formula to convert magnitude to pwm_duty as follows: * - pwm_duty = (magnitude * pwm_period) / MAX_MAGNITUDE(0xFFFF) */ - period_mag_multi = (int64_t)(haptic->pwm_dev->period * - haptic->magnitude); + period_mag_multi = (u64)haptic->pwm_dev->period * haptic->magnitude; haptic->pwm_duty = (unsigned int)(period_mag_multi >> MAX_MAGNITUDE_SHIFT); @@ -342,7 +341,6 @@ static SIMPLE_DEV_PM_OPS(max77693_haptic_pm_ops, static struct platform_driver max77693_haptic_driver = { .driver = { .name = "max77693-haptic", - .owner = THIS_MODULE, .pm = &max77693_haptic_pm_ops, }, .probe = max77693_haptic_probe, diff --git a/drivers/input/misc/max8925_onkey.c b/drivers/input/misc/max8925_onkey.c index 11d0d377023..7c49b8d2389 100644 --- a/drivers/input/misc/max8925_onkey.c +++ b/drivers/input/misc/max8925_onkey.c @@ -166,7 +166,6 @@ static SIMPLE_DEV_PM_OPS(max8925_onkey_pm_ops, max8925_onkey_suspend, max8925_on static struct platform_driver max8925_onkey_driver = { .driver = { .name = "max8925-onkey", - .owner = THIS_MODULE, .pm = &max8925_onkey_pm_ops, }, .probe = max8925_onkey_probe, diff --git a/drivers/input/misc/max8997_haptic.c b/drivers/input/misc/max8997_haptic.c index 980437ac314..d0f68728133 100644 --- a/drivers/input/misc/max8997_haptic.c +++ b/drivers/input/misc/max8997_haptic.c @@ -399,7 +399,6 @@ MODULE_DEVICE_TABLE(i2c, max8997_haptic_id); static struct platform_driver max8997_haptic_driver = { .driver = { .name = "max8997-haptic", - .owner = THIS_MODULE, .pm = &max8997_haptic_pm_ops, }, .probe = max8997_haptic_probe, diff --git a/drivers/input/misc/mc13783-pwrbutton.c b/drivers/input/misc/mc13783-pwrbutton.c index 0df6e8d8bd0..afdf8ef25ee 100644 --- a/drivers/input/misc/mc13783-pwrbutton.c +++ b/drivers/input/misc/mc13783-pwrbutton.c @@ -258,7 +258,6 @@ static struct platform_driver mc13783_pwrbutton_driver = { .remove = mc13783_pwrbutton_remove, .driver = { .name = "mc13783-pwrbutton", - .owner = THIS_MODULE, }, }; diff --git a/drivers/input/misc/palmas-pwrbutton.c b/drivers/input/misc/palmas-pwrbutton.c index 2c4d6ca5faa..1f9b5ee9274 100644 --- a/drivers/input/misc/palmas-pwrbutton.c +++ b/drivers/input/misc/palmas-pwrbutton.c @@ -317,7 +317,6 @@ static struct platform_driver palmas_pwron_driver = { .remove = palmas_pwron_remove, .driver = { .name = "palmas_pwrbutton", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(of_palmas_pwr_match), .pm = &palmas_pwron_pm, }, diff --git a/drivers/input/misc/pcap_keys.c b/drivers/input/misc/pcap_keys.c index cd230365166..3b81daf6772 100644 --- a/drivers/input/misc/pcap_keys.c +++ b/drivers/input/misc/pcap_keys.c @@ -121,7 +121,6 @@ static struct platform_driver pcap_keys_device_driver = { .remove = pcap_keys_remove, .driver = { .name = "pcap-keys", - .owner = THIS_MODULE, } }; module_platform_driver(pcap_keys_device_driver); diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c index 674a2cfc3c0..72b1fc3ab91 100644 --- a/drivers/input/misc/pcspkr.c +++ b/drivers/input/misc/pcspkr.c @@ -125,7 +125,6 @@ static const struct dev_pm_ops pcspkr_pm_ops = { static struct platform_driver pcspkr_platform_driver = { .driver = { .name = "pcspkr", - .owner = THIS_MODULE, .pm = &pcspkr_pm_ops, }, .probe = pcspkr_probe, diff --git a/drivers/input/misc/pm8xxx-vibrator.c b/drivers/input/misc/pm8xxx-vibrator.c index e5266cd9acc..5113877153d 100644 --- a/drivers/input/misc/pm8xxx-vibrator.c +++ b/drivers/input/misc/pm8xxx-vibrator.c @@ -222,7 +222,6 @@ static struct platform_driver pm8xxx_vib_driver = { .probe = pm8xxx_vib_probe, .driver = { .name = "pm8xxx-vib", - .owner = THIS_MODULE, .pm = &pm8xxx_vib_pm_ops, .of_match_table = pm8xxx_vib_id_table, }, diff --git a/drivers/input/misc/pmic8xxx-pwrkey.c b/drivers/input/misc/pmic8xxx-pwrkey.c index 28999455c75..c4ca20e6322 100644 --- a/drivers/input/misc/pmic8xxx-pwrkey.c +++ b/drivers/input/misc/pmic8xxx-pwrkey.c @@ -193,7 +193,6 @@ static struct platform_driver pmic8xxx_pwrkey_driver = { .remove = pmic8xxx_pwrkey_remove, .driver = { .name = "pm8xxx-pwrkey", - .owner = THIS_MODULE, .pm = &pm8xxx_pwr_key_pm_ops, .of_match_table = pm8xxx_pwr_key_id_table, }, diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c index 93f640a38d9..a28ee70ff15 100644 --- a/drivers/input/misc/pwm-beeper.c +++ b/drivers/input/misc/pwm-beeper.c @@ -187,7 +187,6 @@ static struct platform_driver pwm_beeper_driver = { .remove = pwm_beeper_remove, .driver = { .name = "pwm-beeper", - .owner = THIS_MODULE, .pm = PWM_BEEPER_PM_OPS, .of_match_table = of_match_ptr(pwm_beeper_match), }, diff --git a/drivers/input/misc/rb532_button.c b/drivers/input/misc/rb532_button.c index 83fff38b86b..e956e81cd4e 100644 --- a/drivers/input/misc/rb532_button.c +++ b/drivers/input/misc/rb532_button.c @@ -96,7 +96,6 @@ static struct platform_driver rb532_button_driver = { .remove = rb532_button_remove, .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, }, }; module_platform_driver(rb532_button_driver); diff --git a/drivers/input/misc/retu-pwrbutton.c b/drivers/input/misc/retu-pwrbutton.c index 4bff1aa9b0d..0c8ac60e263 100644 --- a/drivers/input/misc/retu-pwrbutton.c +++ b/drivers/input/misc/retu-pwrbutton.c @@ -85,7 +85,6 @@ static struct platform_driver retu_pwrbutton_driver = { .remove = retu_pwrbutton_remove, .driver = { .name = "retu-pwrbutton", - .owner = THIS_MODULE, }, }; module_platform_driver(retu_pwrbutton_driver); diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c index 93558a1c7f7..f27f81ee84e 100644 --- a/drivers/input/misc/rotary_encoder.c +++ b/drivers/input/misc/rotary_encoder.c @@ -325,7 +325,6 @@ static struct platform_driver rotary_encoder_driver = { .remove = rotary_encoder_remove, .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, .of_match_table = of_match_ptr(rotary_encoder_of_match), } }; diff --git a/drivers/input/misc/sgi_btns.c b/drivers/input/misc/sgi_btns.c index f10474937a6..7bbe79d89f5 100644 --- a/drivers/input/misc/sgi_btns.c +++ b/drivers/input/misc/sgi_btns.c @@ -157,7 +157,6 @@ static struct platform_driver sgi_buttons_driver = { .remove = sgi_buttons_remove, .driver = { .name = "sgibtns", - .owner = THIS_MODULE, }, }; module_platform_driver(sgi_buttons_driver); diff --git a/drivers/input/misc/sirfsoc-onkey.c b/drivers/input/misc/sirfsoc-onkey.c index 151f169afb7..9d5b89befe6 100644 --- a/drivers/input/misc/sirfsoc-onkey.c +++ b/drivers/input/misc/sirfsoc-onkey.c @@ -203,7 +203,6 @@ static struct platform_driver sirfsoc_pwrc_driver = { .remove = sirfsoc_pwrc_remove, .driver = { .name = "sirfsoc-pwrc", - .owner = THIS_MODULE, .pm = &sirfsoc_pwrc_pm_ops, .of_match_table = sirfsoc_pwrc_of_match, } diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c index 73560475356..79cc0f79896 100644 --- a/drivers/input/misc/soc_button_array.c +++ b/drivers/input/misc/soc_button_array.c @@ -55,7 +55,7 @@ static int soc_button_lookup_gpio(struct device *dev, int acpi_index) struct gpio_desc *desc; int gpio; - desc = gpiod_get_index(dev, KBUILD_MODNAME, acpi_index); + desc = gpiod_get_index(dev, KBUILD_MODNAME, acpi_index, GPIOD_ASIS); if (IS_ERR(desc)) return PTR_ERR(desc); @@ -214,7 +214,6 @@ static struct platform_driver soc_button_driver = { .remove = soc_button_remove, .driver = { .name = KBUILD_MODNAME, - .owner = THIS_MODULE, .acpi_match_table = ACPI_PTR(soc_button_acpi_match), }, }; diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c index 179ff1cd6f6..54116e544c9 100644 --- a/drivers/input/misc/sparcspkr.c +++ b/drivers/input/misc/sparcspkr.c @@ -257,7 +257,6 @@ static const struct of_device_id bbc_beep_match[] = { static struct platform_driver bbc_beep_driver = { .driver = { .name = "bbcbeep", - .owner = THIS_MODULE, .of_match_table = bbc_beep_match, }, .probe = bbc_beep_probe, @@ -337,7 +336,6 @@ static const struct of_device_id grover_beep_match[] = { static struct platform_driver grover_beep_driver = { .driver = { .name = "groverbeep", - .owner = THIS_MODULE, .of_match_table = grover_beep_match, }, .probe = grover_beep_probe, diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c index fb3b63b2f85..e98cc81a84c 100644 --- a/drivers/input/misc/twl4030-pwrbutton.c +++ b/drivers/input/misc/twl4030-pwrbutton.c @@ -85,6 +85,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, pwr); + device_init_wakeup(&pdev->dev, true); return 0; } @@ -101,7 +102,6 @@ static struct platform_driver twl4030_pwrbutton_driver = { .probe = twl4030_pwrbutton_probe, .driver = { .name = "twl4030_pwrbutton", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(twl4030_pwrbutton_dt_match_table), }, }; diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c index c802c4af480..fc17b9592f5 100644 --- a/drivers/input/misc/twl4030-vibra.c +++ b/drivers/input/misc/twl4030-vibra.c @@ -251,7 +251,6 @@ static struct platform_driver twl4030_vibra_driver = { .probe = twl4030_vibra_probe, .driver = { .name = "twl4030-vibra", - .owner = THIS_MODULE, .pm = &twl4030_vibra_pm_ops, }, }; diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c index 190fdef06e8..0e0d094df2e 100644 --- a/drivers/input/misc/twl6040-vibra.c +++ b/drivers/input/misc/twl6040-vibra.c @@ -386,7 +386,6 @@ static struct platform_driver twl6040_vibra_driver = { .probe = twl6040_vibra_probe, .driver = { .name = "twl6040-vibra", - .owner = THIS_MODULE, .pm = &twl6040_vibra_pm_ops, }, }; diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 7b7add5061a..e25f87ba19f 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c @@ -1347,7 +1347,6 @@ static const struct dev_pm_ops wistron_pm_ops = { static struct platform_driver wistron_driver = { .driver = { .name = "wistron-bios", - .owner = THIS_MODULE, #ifdef CONFIG_PM .pm = &wistron_pm_ops, #endif diff --git a/drivers/input/misc/wm831x-on.c b/drivers/input/misc/wm831x-on.c index 173b6dcca0d..59d4f7bcb4a 100644 --- a/drivers/input/misc/wm831x-on.c +++ b/drivers/input/misc/wm831x-on.c @@ -138,7 +138,6 @@ static struct platform_driver wm831x_on_driver = { .remove = wm831x_on_remove, .driver = { .name = "wm831x-on", - .owner = THIS_MODULE, }, }; module_platform_driver(wm831x_on_driver); diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c index fbfdc10573b..95599e478e1 100644 --- a/drivers/input/misc/xen-kbdfront.c +++ b/drivers/input/misc/xen-kbdfront.c @@ -285,7 +285,7 @@ static int xenkbd_connect_backend(struct xenbus_device *dev, error_evtchan: xenbus_free_evtchn(dev, evtchn); error_grant: - gnttab_end_foreign_access_ref(info->gref, 0); + gnttab_end_foreign_access(info->gref, 0, 0UL); info->gref = -1; return ret; } @@ -296,7 +296,7 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *info) unbind_from_irqhandler(info->irq, info); info->irq = -1; if (info->gref >= 0) - gnttab_end_foreign_access_ref(info->gref, 0); + gnttab_end_foreign_access(info->gref, 0, 0UL); info->gref = -1; } @@ -365,12 +365,13 @@ static const struct xenbus_device_id xenkbd_ids[] = { { "" } }; -static DEFINE_XENBUS_DRIVER(xenkbd, , +static struct xenbus_driver xenkbd_driver = { + .ids = xenkbd_ids, .probe = xenkbd_probe, .remove = xenkbd_remove, .resume = xenkbd_resume, .otherend_changed = xenkbd_backend_changed, -); +}; static int __init xenkbd_init(void) { diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index dd2fd397466..f719f28d370 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -846,8 +846,8 @@ static void alps_process_packet_v4(struct psmouse *psmouse) f->fingers = alps_process_bitmap(priv, f); } - f->left = packet[4] & 0x01; - f->right = packet[4] & 0x02; + f->left = !!(packet[4] & 0x01); + f->right = !!(packet[4] & 0x02); f->st.x = ((packet[1] & 0x7f) << 4) | ((packet[3] & 0x30) >> 2) | ((packet[0] & 0x30) >> 4); @@ -1238,7 +1238,13 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) { struct alps_data *priv = psmouse->private; - if ((psmouse->packet[0] & 0xc8) == 0x08) { /* PS/2 packet */ + /* + * Check if we are dealing with a bare PS/2 packet, presumably from + * a device connected to the external PS/2 port. Because bare PS/2 + * protocol does not have enough constant bits to self-synchronize + * properly we only do this if the device is fully synchronized. + */ + if (!psmouse->out_of_sync_cnt && (psmouse->packet[0] & 0xc8) == 0x08) { if (psmouse->pktcnt == 3) { alps_report_bare_ps2_packet(psmouse, psmouse->packet, true); @@ -1262,12 +1268,27 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) } /* Bytes 2 - pktsize should have 0 in the highest bit */ - if ((priv->proto_version < ALPS_PROTO_V5) && + if (priv->proto_version < ALPS_PROTO_V5 && psmouse->pktcnt >= 2 && psmouse->pktcnt <= psmouse->pktsize && (psmouse->packet[psmouse->pktcnt - 1] & 0x80)) { psmouse_dbg(psmouse, "refusing packet[%i] = %x\n", psmouse->pktcnt - 1, psmouse->packet[psmouse->pktcnt - 1]); + + if (priv->proto_version == ALPS_PROTO_V3 && + psmouse->pktcnt == psmouse->pktsize) { + /* + * Some Dell boxes, such as Latitude E6440 or E7440 + * with closed lid, quite often smash last byte of + * otherwise valid packet with 0xff. Given that the + * next packet is very likely to be valid let's + * report PSMOUSE_FULL_PACKET but not process data, + * rather than reporting PSMOUSE_BAD_DATA and + * filling the logs. + */ + return PSMOUSE_FULL_PACKET; + } + return PSMOUSE_BAD_DATA; } @@ -2481,6 +2502,9 @@ int alps_init(struct psmouse *psmouse) /* We are having trouble resyncing ALPS touchpads so disable it for now */ psmouse->resync_time = 0; + /* Allow 2 invalid packets without resetting device */ + psmouse->resetafter = psmouse->pktsize * 2; + return 0; init_fail: diff --git a/drivers/input/mouse/amimouse.c b/drivers/input/mouse/amimouse.c index 62ec52b2e34..a7fd8f22ba5 100644 --- a/drivers/input/mouse/amimouse.c +++ b/drivers/input/mouse/amimouse.c @@ -141,7 +141,6 @@ static struct platform_driver amimouse_driver = { .remove = __exit_p(amimouse_remove), .driver = { .name = "amiga-mouse", - .owner = THIS_MODULE, }, }; diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 06fc6e76ffb..f2b97802640 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -428,14 +428,6 @@ static void elantech_report_trackpoint(struct psmouse *psmouse, int x, y; u32 t; - if (dev_WARN_ONCE(&psmouse->ps2dev.serio->dev, - !tp_dev, - psmouse_fmt("Unexpected trackpoint message\n"))) { - if (etd->debug == 1) - elantech_packet_dump(psmouse); - return; - } - t = get_unaligned_le32(&packet[0]); switch (t & ~7U) { @@ -563,6 +555,7 @@ static void elantech_input_sync_v4(struct psmouse *psmouse) } else { input_report_key(dev, BTN_LEFT, packet[0] & 0x01); input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); + input_report_key(dev, BTN_MIDDLE, packet[0] & 0x04); } input_mt_report_pointer_emulation(dev, true); @@ -792,6 +785,9 @@ static int elantech_packet_check_v4(struct psmouse *psmouse) unsigned char packet_type = packet[3] & 0x03; bool sanity_check; + if (etd->tp_dev && (packet[3] & 0x0f) == 0x06) + return PACKET_TRACKPOINT; + /* * Sanity check based on the constant bits of a packet. * The constant bits change depending on the value of @@ -877,10 +873,19 @@ static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse) case 4: packet_type = elantech_packet_check_v4(psmouse); - if (packet_type == PACKET_UNKNOWN) + switch (packet_type) { + case PACKET_UNKNOWN: return PSMOUSE_BAD_DATA; - elantech_report_absolute_v4(psmouse, packet_type); + case PACKET_TRACKPOINT: + elantech_report_trackpoint(psmouse, packet_type); + break; + + default: + elantech_report_absolute_v4(psmouse, packet_type); + break; + } + break; } @@ -1120,6 +1125,22 @@ static void elantech_set_buttonpad_prop(struct psmouse *psmouse) } /* + * Some hw_version 4 models do have a middle button + */ +static const struct dmi_system_id elantech_dmi_has_middle_button[] = { +#if defined(CONFIG_DMI) && defined(CONFIG_X86) + { + /* Fujitsu H730 has a middle button */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "CELSIUS H730"), + }, + }, +#endif + { } +}; + +/* * Set the appropriate event bits for the input subsystem */ static int elantech_set_input_params(struct psmouse *psmouse) @@ -1138,6 +1159,8 @@ static int elantech_set_input_params(struct psmouse *psmouse) __clear_bit(EV_REL, dev->evbit); __set_bit(BTN_LEFT, dev->keybit); + if (dmi_check_system(elantech_dmi_has_middle_button)) + __set_bit(BTN_MIDDLE, dev->keybit); __set_bit(BTN_RIGHT, dev->keybit); __set_bit(BTN_TOUCH, dev->keybit); @@ -1299,6 +1322,7 @@ ELANTECH_INT_ATTR(reg_25, 0x25); ELANTECH_INT_ATTR(reg_26, 0x26); ELANTECH_INT_ATTR(debug, 0); ELANTECH_INT_ATTR(paritycheck, 0); +ELANTECH_INT_ATTR(crc_enabled, 0); static struct attribute *elantech_attrs[] = { &psmouse_attr_reg_07.dattr.attr, @@ -1313,6 +1337,7 @@ static struct attribute *elantech_attrs[] = { &psmouse_attr_reg_26.dattr.attr, &psmouse_attr_debug.dattr.attr, &psmouse_attr_paritycheck.dattr.attr, + &psmouse_attr_crc_enabled.dattr.attr, NULL }; @@ -1439,6 +1464,22 @@ static int elantech_reconnect(struct psmouse *psmouse) } /* + * Some hw_version 4 models do not work with crc_disabled + */ +static const struct dmi_system_id elantech_dmi_force_crc_enabled[] = { +#if defined(CONFIG_DMI) && defined(CONFIG_X86) + { + /* Fujitsu H730 does not work with crc_enabled == 0 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "CELSIUS H730"), + }, + }, +#endif + { } +}; + +/* * Some hw_version 3 models go into error state when we try to set * bit 3 and/or bit 1 of r10. */ @@ -1513,7 +1554,8 @@ static int elantech_set_properties(struct elantech_data *etd) * The signatures of v3 and v4 packets change depending on the * value of this hardware flag. */ - etd->crc_enabled = ((etd->fw_version & 0x4000) == 0x4000); + etd->crc_enabled = (etd->fw_version & 0x4000) == 0x4000 || + dmi_check_system(elantech_dmi_force_crc_enabled); /* Enable real hardware resolution on hw_version 3 ? */ etd->set_hw_resolution = !dmi_check_system(no_hw_res_dmi_table); diff --git a/drivers/input/mouse/gpio_mouse.c b/drivers/input/mouse/gpio_mouse.c index 8c7d94200bd..ced07391304 100644 --- a/drivers/input/mouse/gpio_mouse.c +++ b/drivers/input/mouse/gpio_mouse.c @@ -171,7 +171,6 @@ static struct platform_driver gpio_mouse_device_driver = { .remove = gpio_mouse_remove, .driver = { .name = "gpio_mouse", - .owner = THIS_MODULE, } }; module_platform_driver(gpio_mouse_device_driver); diff --git a/drivers/input/mouse/navpoint.c b/drivers/input/mouse/navpoint.c index 69017279e8d..d6e8f58a1de 100644 --- a/drivers/input/mouse/navpoint.c +++ b/drivers/input/mouse/navpoint.c @@ -353,7 +353,6 @@ static struct platform_driver navpoint_driver = { .remove = navpoint_remove, .driver = { .name = "navpoint", - .owner = THIS_MODULE, .pm = &navpoint_pm_ops, }, }; diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index 4a9de33a9af..68469feda47 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c @@ -1548,16 +1548,9 @@ static int psmouse_reconnect(struct serio *serio) { struct psmouse *psmouse = serio_get_drvdata(serio); struct psmouse *parent = NULL; - struct serio_driver *drv = serio->drv; unsigned char type; int rc = -1; - if (!drv || !psmouse) { - psmouse_dbg(psmouse, - "reconnect request, but serio is disconnected, ignoring...\n"); - return -1; - } - mutex_lock(&psmouse_mutex); if (serio->parent && serio->id.type == SERIO_PS_PSTHRU) { diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 8ae1841059b..f89de8971bf 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -135,14 +135,18 @@ static const struct min_max_quirk min_max_pnpid_table[] = { 1232, 5710, 1156, 4696 }, { - (const char * const []){"LEN0034", "LEN0036", "LEN2002", - "LEN2004", NULL}, + (const char * const []){"LEN0034", "LEN0036", "LEN0039", + "LEN2002", "LEN2004", NULL}, 1024, 5112, 2024, 4832 }, { (const char * const []){"LEN2001", NULL}, 1024, 5022, 2508, 4832 }, + { + (const char * const []){"LEN2006", NULL}, + 1264, 5675, 1171, 4688 + }, { } }; @@ -163,6 +167,7 @@ static const char * const topbuttonpad_pnp_ids[] = { "LEN0036", /* T440 */ "LEN0037", "LEN0038", + "LEN0039", /* T440s */ "LEN0041", "LEN0042", /* Yoga */ "LEN0045", diff --git a/drivers/input/mouse/vsxxxaa.c b/drivers/input/mouse/vsxxxaa.c index 38298232124..abd494411e6 100644 --- a/drivers/input/mouse/vsxxxaa.c +++ b/drivers/input/mouse/vsxxxaa.c @@ -128,7 +128,7 @@ static void vsxxxaa_drop_bytes(struct vsxxxaa *mouse, int num) if (num >= mouse->count) { mouse->count = 0; } else { - memmove(mouse->buf, mouse->buf + num - 1, BUFLEN - num); + memmove(mouse->buf, mouse->buf + num, BUFLEN - num); mouse->count -= num; } } diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c index b74fc2fef86..131d7826dc6 100644 --- a/drivers/input/serio/altera_ps2.c +++ b/drivers/input/serio/altera_ps2.c @@ -35,7 +35,7 @@ static irqreturn_t altera_ps2_rxint(int irq, void *dev_id) { struct ps2if *ps2if = dev_id; unsigned int status; - int handled = IRQ_NONE; + irqreturn_t handled = IRQ_NONE; while ((status = readl(ps2if->base)) & 0xffff0000) { serio_interrupt(ps2if->io, status & 0xff, 0); @@ -72,7 +72,7 @@ static void altera_ps2_close(struct serio *io) { struct ps2if *ps2if = io->port_data; - writel(0, ps2if->base); /* disable rx irq */ + writel(0, ps2if->base + 4); /* disable rx irq */ } /* @@ -156,7 +156,6 @@ static struct platform_driver altera_ps2_driver = { .remove = altera_ps2_remove, .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, .of_match_table = of_match_ptr(altera_ps2_match), }, }; diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c index 98be824544a..45d4e08ca4f 100644 --- a/drivers/input/serio/apbps2.c +++ b/drivers/input/serio/apbps2.c @@ -214,7 +214,6 @@ MODULE_DEVICE_TABLE(of, apbps2_of_match); static struct platform_driver apbps2_of_driver = { .driver = { .name = "grlib-apbps2", - .owner = THIS_MODULE, .of_match_table = apbps2_of_match, }, .probe = apbps2_of_probe, diff --git a/drivers/input/serio/arc_ps2.c b/drivers/input/serio/arc_ps2.c index 8024a6d7fcc..99e57a41875 100644 --- a/drivers/input/serio/arc_ps2.c +++ b/drivers/input/serio/arc_ps2.c @@ -266,7 +266,6 @@ MODULE_DEVICE_TABLE(of, arc_ps2_match); static struct platform_driver arc_ps2_driver = { .driver = { .name = "arc_ps2", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(arc_ps2_match), }, .probe = arc_ps2_probe, diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c index 3290b287ac4..2e4ff5bac75 100644 --- a/drivers/input/serio/at32psif.c +++ b/drivers/input/serio/at32psif.c @@ -352,7 +352,6 @@ static struct platform_driver psif_driver = { .remove = __exit_p(psif_remove), .driver = { .name = "atmel_psif", - .owner = THIS_MODULE, .pm = &psif_pm_ops, }, }; diff --git a/drivers/input/serio/ct82c710.c b/drivers/input/serio/ct82c710.c index cfe549d4eaa..9c54c43c974 100644 --- a/drivers/input/serio/ct82c710.c +++ b/drivers/input/serio/ct82c710.c @@ -209,7 +209,6 @@ static int ct82c710_remove(struct platform_device *dev) static struct platform_driver ct82c710_driver = { .driver = { .name = "ct82c710", - .owner = THIS_MODULE, }, .probe = ct82c710_probe, .remove = ct82c710_remove, diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h index 93cb7912703..afcd1c1a05b 100644 --- a/drivers/input/serio/i8042-sparcio.h +++ b/drivers/input/serio/i8042-sparcio.h @@ -99,7 +99,6 @@ MODULE_DEVICE_TABLE(of, sparc_i8042_match); static struct platform_driver sparc_i8042_driver = { .driver = { .name = "i8042", - .owner = THIS_MODULE, .of_match_table = sparc_i8042_match, }, .probe = sparc_i8042_probe, diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index a26366a263a..c66d1b53843 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h @@ -207,17 +207,282 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = { }; /* - * Some laptops do implement active multiplexing mode correctly; - * unfortunately they are in minority. + * Some Fujitsu notebooks are having trouble with touchpads if + * active multiplexing mode is activated. Luckily they don't have + * external PS/2 ports so we can safely disable it. + * ... apparently some Toshibas don't like MUX mode either and + * die horrible death on reboot. */ -static const struct dmi_system_id __initconst i8042_dmi_mux_table[] = { +static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = { + { + /* Fujitsu Lifebook P7010/P7010D */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "P7010"), + }, + }, + { + /* Fujitsu Lifebook P7010 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "0000000000"), + }, + }, + { + /* Fujitsu Lifebook P5020D */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook P Series"), + }, + }, + { + /* Fujitsu Lifebook S2000 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S Series"), + }, + }, + { + /* Fujitsu Lifebook S6230 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S6230"), + }, + }, + { + /* Fujitsu T70H */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"), + }, + }, + { + /* Fujitsu-Siemens Lifebook T3010 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK T3010"), + }, + }, + { + /* Fujitsu-Siemens Lifebook E4010 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E4010"), + }, + }, + { + /* Fujitsu-Siemens Amilo Pro 2010 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pro V2010"), + }, + }, + { + /* Fujitsu-Siemens Amilo Pro 2030 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"), + }, + }, + { + /* + * No data is coming from the touchscreen unless KBC + * is in legacy mode. + */ + /* Panasonic CF-29 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"), + DMI_MATCH(DMI_PRODUCT_NAME, "CF-29"), + }, + }, + { + /* + * HP Pavilion DV4017EA - + * errors on MUX ports are reported without raising AUXDATA + * causing "spurious NAK" messages. + */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EA032EA#ABF)"), + }, + }, + { + /* + * HP Pavilion ZT1000 - + * like DV4017EA does not raise AUXERR for errors on MUX ports. + */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion Notebook PC"), + DMI_MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook ZT1000"), + }, + }, + { + /* + * HP Pavilion DV4270ca - + * like DV4017EA does not raise AUXERR for errors on MUX ports. + */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EH476UA#ABL)"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), + DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P10"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), + DMI_MATCH(DMI_PRODUCT_NAME, "EQUIUM A110"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), + DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE C850D"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ALIENWARE"), + DMI_MATCH(DMI_PRODUCT_NAME, "Sentia"), + }, + }, + { + /* Sharp Actius MM20 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "SHARP"), + DMI_MATCH(DMI_PRODUCT_NAME, "PC-MM20 Series"), + }, + }, + { + /* Sony Vaio FS-115b */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FS115B"), + }, + }, + { + /* + * Sony Vaio FZ-240E - + * reset and GET ID commands issued via KBD port are + * sometimes being delivered to AUX3. + */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ240E"), + }, + }, { /* - * Panasonic CF-18 needs to be in MUX mode since the - * touchscreen is on serio3 and it also has touchpad. + * Most (all?) VAIOs do not have external PS/2 ports nor + * they implement active multiplexing properly, and + * MUX discovery usually messes up keyboard/touchpad. */ .matches = { - DMI_MATCH(DMI_PRODUCT_NAME, "CF-18"), + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), + DMI_MATCH(DMI_BOARD_NAME, "VAIO"), + }, + }, + { + /* Amoi M636/A737 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."), + DMI_MATCH(DMI_PRODUCT_NAME, "M636/A737 platform"), + }, + }, + { + /* Lenovo 3000 n100 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "076804U"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1360"), + }, + }, + { + /* Acer Aspire 5710 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5710"), + }, + }, + { + /* Gericom Bellagio */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Gericom"), + DMI_MATCH(DMI_PRODUCT_NAME, "N34AS6"), + }, + }, + { + /* IBM 2656 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "IBM"), + DMI_MATCH(DMI_PRODUCT_NAME, "2656"), + }, + }, + { + /* Dell XPS M1530 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "XPS M1530"), + }, + }, + { + /* Compal HEL80I */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "COMPAL"), + DMI_MATCH(DMI_PRODUCT_NAME, "HEL80I"), + }, + }, + { + /* Dell Vostro 1510 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"), + }, + }, + { + /* Acer Aspire 5536 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5536"), + DMI_MATCH(DMI_PRODUCT_VERSION, "0100"), + }, + }, + { + /* Dell Vostro V13 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V13"), + }, + }, + { + /* Newer HP Pavilion dv4 models */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv4 Notebook PC"), + }, + }, + { + /* Asus X450LCP */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_PRODUCT_NAME, "X450LCP"), + }, + }, + { + /* Avatar AVIU-145A6 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Intel"), + DMI_MATCH(DMI_PRODUCT_NAME, "IC4I"), }, }, { } @@ -374,6 +639,22 @@ static const struct dmi_system_id __initconst i8042_dmi_notimeout_table[] = { }, }, { + /* Fujitsu A544 laptop */ + /* https://bugzilla.redhat.com/show_bug.cgi?id=1111138 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK A544"), + }, + }, + { + /* Fujitsu AH544 laptop */ + /* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK AH544"), + }, + }, + { /* Fujitsu U574 laptop */ /* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */ .matches = { @@ -750,8 +1031,8 @@ static int __init i8042_platform_init(void) if (dmi_check_system(i8042_dmi_noloop_table)) i8042_noloop = true; - if (dmi_check_system(i8042_dmi_mux_table)) - i8042_nomux = false; + if (dmi_check_system(i8042_dmi_nomux_table)) + i8042_nomux = true; if (dmi_check_system(i8042_dmi_notimeout_table)) i8042_notimeout = true; diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 9a97c2b1092..924e4bf357f 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -39,7 +39,7 @@ static bool i8042_noaux; module_param_named(noaux, i8042_noaux, bool, 0); MODULE_PARM_DESC(noaux, "Do not probe or use AUX (mouse) port."); -static bool i8042_nomux = true; +static bool i8042_nomux; module_param_named(nomux, i8042_nomux, bool, 0); MODULE_PARM_DESC(nomux, "Do not check whether an active multiplexing controller is present."); @@ -1463,7 +1463,6 @@ static int i8042_remove(struct platform_device *dev) static struct platform_driver i8042_driver = { .driver = { .name = "i8042", - .owner = THIS_MODULE, #ifdef CONFIG_PM .pm = &i8042_pm_ops, #endif diff --git a/drivers/input/serio/maceps2.c b/drivers/input/serio/maceps2.c index bc85e1cc66d..e365c5f4cbc 100644 --- a/drivers/input/serio/maceps2.c +++ b/drivers/input/serio/maceps2.c @@ -162,7 +162,6 @@ static int maceps2_remove(struct platform_device *dev) static struct platform_driver maceps2_driver = { .driver = { .name = "maceps2", - .owner = THIS_MODULE, }, .probe = maceps2_probe, .remove = maceps2_remove, diff --git a/drivers/input/serio/olpc_apsp.c b/drivers/input/serio/olpc_apsp.c index d906f3ebc8c..8e9a4209fca 100644 --- a/drivers/input/serio/olpc_apsp.c +++ b/drivers/input/serio/olpc_apsp.c @@ -273,7 +273,6 @@ static struct platform_driver olpc_apsp_driver = { .remove = olpc_apsp_remove, .driver = { .name = "olpc-apsp", - .owner = THIS_MODULE, .of_match_table = olpc_apsp_dt_ids, }, }; diff --git a/drivers/input/serio/q40kbd.c b/drivers/input/serio/q40kbd.c index 594256c3855..5a9d521510b 100644 --- a/drivers/input/serio/q40kbd.c +++ b/drivers/input/serio/q40kbd.c @@ -186,7 +186,6 @@ static int q40kbd_remove(struct platform_device *pdev) static struct platform_driver q40kbd_driver = { .driver = { .name = "q40kbd", - .owner = THIS_MODULE, }, .remove = q40kbd_remove, }; diff --git a/drivers/input/serio/rpckbd.c b/drivers/input/serio/rpckbd.c index e462e7791bb..8cf96473690 100644 --- a/drivers/input/serio/rpckbd.c +++ b/drivers/input/serio/rpckbd.c @@ -168,7 +168,6 @@ static struct platform_driver rpckbd_driver = { .remove = rpckbd_remove, .driver = { .name = "kart", - .owner = THIS_MODULE, }, }; module_platform_driver(rpckbd_driver); diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index e6cf52ebad8..5223cbf9426 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c @@ -363,7 +363,6 @@ MODULE_DEVICE_TABLE(of, xps2_of_match); static struct platform_driver xps2_of_driver = { .driver = { .name = DRIVER_NAME, - .owner = THIS_MODULE, .of_match_table = xps2_of_match, }, .probe = xps2_of_probe, diff --git a/drivers/input/touchscreen/88pm860x-ts.c b/drivers/input/touchscreen/88pm860x-ts.c index 0d4a9fad4a7..251ff2aa063 100644 --- a/drivers/input/touchscreen/88pm860x-ts.c +++ b/drivers/input/touchscreen/88pm860x-ts.c @@ -292,7 +292,6 @@ static int pm860x_touch_probe(struct platform_device *pdev) static struct platform_driver pm860x_touch_driver = { .driver = { .name = "88pm860x-touch", - .owner = THIS_MODULE, }, .probe = pm860x_touch_probe, }; diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c index 927feec1e85..fec66ad8051 100644 --- a/drivers/input/touchscreen/ad7879.c +++ b/drivers/input/touchscreen/ad7879.c @@ -468,14 +468,10 @@ static int ad7879_gpio_add(struct ad7879 *ts, static void ad7879_gpio_remove(struct ad7879 *ts) { const struct ad7879_platform_data *pdata = dev_get_platdata(ts->dev); - int ret; - if (pdata->gpio_export) { - ret = gpiochip_remove(&ts->gc); - if (ret) - dev_err(ts->dev, "failed to remove gpio %d\n", - ts->gc.base); - } + if (pdata->gpio_export) + gpiochip_remove(&ts->gc); + } #else static inline int ad7879_gpio_add(struct ad7879 *ts, diff --git a/drivers/input/touchscreen/atmel-wm97xx.c b/drivers/input/touchscreen/atmel-wm97xx.c index 279c0e42b8a..7ec0421c0dd 100644 --- a/drivers/input/touchscreen/atmel-wm97xx.c +++ b/drivers/input/touchscreen/atmel-wm97xx.c @@ -425,7 +425,6 @@ static struct platform_driver atmel_wm97xx_driver = { .remove = __exit_p(atmel_wm97xx_remove), .driver = { .name = "wm97xx-touch", - .owner = THIS_MODULE, .pm = &atmel_wm97xx_pm_ops, }, }; diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index bb070206223..95ee92a91bd 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -99,13 +99,9 @@ #define MXT_T6_STATUS_COMSERR (1 << 2) /* MXT_GEN_POWER_T7 field */ -struct t7_config { - u8 idle; - u8 active; -} __packed; - -#define MXT_POWER_CFG_RUN 0 -#define MXT_POWER_CFG_DEEPSLEEP 1 +#define MXT_POWER_IDLEACQINT 0 +#define MXT_POWER_ACTVACQINT 1 +#define MXT_POWER_ACTV2IDLETO 2 /* MXT_GEN_ACQUIRE_T8 field */ #define MXT_ACQUIRE_CHRGTIME 0 @@ -117,6 +113,7 @@ struct t7_config { #define MXT_ACQUIRE_ATCHCALSTHR 7 /* MXT_TOUCH_MULTI_T9 field */ +#define MXT_TOUCH_CTRL 0 #define MXT_T9_ORIENT 9 #define MXT_T9_RANGE 18 @@ -256,7 +253,6 @@ struct mxt_data { bool update_input; u8 last_message_count; u8 num_touchids; - struct t7_config t7_cfg; /* Cached parameters from object table */ u16 T5_address; @@ -672,6 +668,20 @@ static void mxt_proc_t6_messages(struct mxt_data *data, u8 *msg) data->t6_status = status; } +static int mxt_write_object(struct mxt_data *data, + u8 type, u8 offset, u8 val) +{ + struct mxt_object *object; + u16 reg; + + object = mxt_get_object(data, type); + if (!object || offset >= mxt_obj_size(object)) + return -EINVAL; + + reg = object->start_address; + return mxt_write_reg(data->client, reg + offset, val); +} + static void mxt_input_button(struct mxt_data *data, u8 *message) { struct input_dev *input = data->input_dev; @@ -1742,60 +1752,6 @@ err_free_object_table: return error; } -static int mxt_set_t7_power_cfg(struct mxt_data *data, u8 sleep) -{ - struct device *dev = &data->client->dev; - int error; - struct t7_config *new_config; - struct t7_config deepsleep = { .active = 0, .idle = 0 }; - - if (sleep == MXT_POWER_CFG_DEEPSLEEP) - new_config = &deepsleep; - else - new_config = &data->t7_cfg; - - error = __mxt_write_reg(data->client, data->T7_address, - sizeof(data->t7_cfg), new_config); - if (error) - return error; - - dev_dbg(dev, "Set T7 ACTV:%d IDLE:%d\n", - new_config->active, new_config->idle); - - return 0; -} - -static int mxt_init_t7_power_cfg(struct mxt_data *data) -{ - struct device *dev = &data->client->dev; - int error; - bool retry = false; - -recheck: - error = __mxt_read_reg(data->client, data->T7_address, - sizeof(data->t7_cfg), &data->t7_cfg); - if (error) - return error; - - if (data->t7_cfg.active == 0 || data->t7_cfg.idle == 0) { - if (!retry) { - dev_dbg(dev, "T7 cfg zero, resetting\n"); - mxt_soft_reset(data); - retry = true; - goto recheck; - } else { - dev_dbg(dev, "T7 cfg zero after reset, overriding\n"); - data->t7_cfg.active = 20; - data->t7_cfg.idle = 100; - return mxt_set_t7_power_cfg(data, MXT_POWER_CFG_RUN); - } - } - - dev_dbg(dev, "Initialized power cfg: ACTV %d, IDLE %d\n", - data->t7_cfg.active, data->t7_cfg.idle); - return 0; -} - static int mxt_configure_objects(struct mxt_data *data, const struct firmware *cfg) { @@ -1809,12 +1765,6 @@ static int mxt_configure_objects(struct mxt_data *data, dev_warn(dev, "Error %d updating config\n", error); } - error = mxt_init_t7_power_cfg(data); - if (error) { - dev_err(dev, "Failed to initialize power cfg\n"); - return error; - } - error = mxt_initialize_t9_input_device(data); if (error) return error; @@ -2093,15 +2043,16 @@ static const struct attribute_group mxt_attr_group = { static void mxt_start(struct mxt_data *data) { - mxt_set_t7_power_cfg(data, MXT_POWER_CFG_RUN); - - /* Recalibrate since chip has been in deep sleep */ - mxt_t6_command(data, MXT_COMMAND_CALIBRATE, 1, false); + /* Touch enable */ + mxt_write_object(data, + MXT_TOUCH_MULTI_T9, MXT_TOUCH_CTRL, 0x83); } static void mxt_stop(struct mxt_data *data) { - mxt_set_t7_power_cfg(data, MXT_POWER_CFG_DEEPSLEEP); + /* Touch disable */ + mxt_write_object(data, + MXT_TOUCH_MULTI_T9, MXT_TOUCH_CTRL, 0); } static int mxt_input_open(struct input_dev *dev) @@ -2266,6 +2217,8 @@ static int __maybe_unused mxt_resume(struct device *dev) struct mxt_data *data = i2c_get_clientdata(client); struct input_dev *input_dev = data->input_dev; + mxt_soft_reset(data); + mutex_lock(&input_dev->mutex); if (input_dev->users) diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c index a035a390f8e..568a3d340c8 100644 --- a/drivers/input/touchscreen/cyttsp4_core.c +++ b/drivers/input/touchscreen/cyttsp4_core.c @@ -1716,7 +1716,7 @@ static void cyttsp4_free_si_ptrs(struct cyttsp4 *cd) kfree(si->btn_rec_data); } -#if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME) +#ifdef CONFIG_PM static int cyttsp4_core_sleep(struct cyttsp4 *cd) { int rc; diff --git a/drivers/input/touchscreen/da9034-ts.c b/drivers/input/touchscreen/da9034-ts.c index cf6f4b31db4..8264822dc4b 100644 --- a/drivers/input/touchscreen/da9034-ts.c +++ b/drivers/input/touchscreen/da9034-ts.c @@ -357,7 +357,6 @@ static int da9034_touch_probe(struct platform_device *pdev) static struct platform_driver da9034_touch_driver = { .driver = { .name = "da9034-touch", - .owner = THIS_MODULE, }, .probe = da9034_touch_probe, }; diff --git a/drivers/input/touchscreen/da9052_tsi.c b/drivers/input/touchscreen/da9052_tsi.c index ab64d58c3ac..5a013bb7bca 100644 --- a/drivers/input/touchscreen/da9052_tsi.c +++ b/drivers/input/touchscreen/da9052_tsi.c @@ -337,7 +337,6 @@ static struct platform_driver da9052_tsi_driver = { .remove = da9052_ts_remove, .driver = { .name = "da9052-tsi", - .owner = THIS_MODULE, }, }; diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index dcc68efd0d7..d4c24fb7704 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -812,7 +812,7 @@ static int edt_ft5x06_ts_identify(struct i2c_client *client, /* if we find something consistent, stay with that assumption * at least M09 won't send 3 bytes here */ - if (!(strnicmp(rdbuf + 1, "EP0", 3))) { + if (!(strncasecmp(rdbuf + 1, "EP0", 3))) { tsdata->version = M06; /* remove last '$' end marker */ diff --git a/drivers/input/touchscreen/intel-mid-touch.c b/drivers/input/touchscreen/intel-mid-touch.c index c38ca4a7e38..b4f0725a1c3 100644 --- a/drivers/input/touchscreen/intel-mid-touch.c +++ b/drivers/input/touchscreen/intel-mid-touch.c @@ -644,7 +644,6 @@ static int mrstouch_probe(struct platform_device *pdev) static struct platform_driver mrstouch_driver = { .driver = { .name = "pmic_touch", - .owner = THIS_MODULE, }, .probe = mrstouch_probe, }; diff --git a/drivers/input/touchscreen/jornada720_ts.c b/drivers/input/touchscreen/jornada720_ts.c index 651ec71a5c6..ea3b6a5b83e 100644 --- a/drivers/input/touchscreen/jornada720_ts.c +++ b/drivers/input/touchscreen/jornada720_ts.c @@ -148,7 +148,6 @@ static struct platform_driver jornada720_ts_driver = { .probe = jornada720_ts_probe, .driver = { .name = "jornada_ts", - .owner = THIS_MODULE, }, }; module_platform_driver(jornada720_ts_driver); diff --git a/drivers/input/touchscreen/lpc32xx_ts.c b/drivers/input/touchscreen/lpc32xx_ts.c index bb47d3442a3..24d704cd9f8 100644 --- a/drivers/input/touchscreen/lpc32xx_ts.c +++ b/drivers/input/touchscreen/lpc32xx_ts.c @@ -396,7 +396,6 @@ static struct platform_driver lpc32xx_ts_driver = { .remove = lpc32xx_ts_remove, .driver = { .name = MOD_NAME, - .owner = THIS_MODULE, .pm = LPC32XX_TS_PM_OPS, .of_match_table = of_match_ptr(lpc32xx_tsc_of_match), }, diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c index d6f099c47f8..913e25a994b 100644 --- a/drivers/input/touchscreen/mc13783_ts.c +++ b/drivers/input/touchscreen/mc13783_ts.c @@ -243,7 +243,6 @@ static int mc13783_ts_remove(struct platform_device *pdev) static struct platform_driver mc13783_ts_driver = { .remove = mc13783_ts_remove, .driver = { - .owner = THIS_MODULE, .name = MC13783_TS_NAME, }, }; diff --git a/drivers/input/touchscreen/pcap_ts.c b/drivers/input/touchscreen/pcap_ts.c index cff2376817e..23a354a392a 100644 --- a/drivers/input/touchscreen/pcap_ts.c +++ b/drivers/input/touchscreen/pcap_ts.c @@ -247,7 +247,6 @@ static struct platform_driver pcap_ts_driver = { .remove = pcap_ts_remove, .driver = { .name = "pcap-ts", - .owner = THIS_MODULE, .pm = PCAP_TS_PM_OPS, }, }; diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c index 5a69ded9b53..bdfa27dc097 100644 --- a/drivers/input/touchscreen/s3c2410_ts.c +++ b/drivers/input/touchscreen/s3c2410_ts.c @@ -422,7 +422,6 @@ MODULE_DEVICE_TABLE(platform, s3cts_driver_ids); static struct platform_driver s3c_ts_driver = { .driver = { .name = "samsung-ts", - .owner = THIS_MODULE, #ifdef CONFIG_PM .pm = &s3c_ts_pmops, #endif diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c index 42ce31afa25..2d5ff86b343 100644 --- a/drivers/input/touchscreen/stmpe-ts.c +++ b/drivers/input/touchscreen/stmpe-ts.c @@ -384,7 +384,6 @@ static int stmpe_ts_remove(struct platform_device *pdev) static struct platform_driver stmpe_ts_driver = { .driver = { .name = STMPE_TS_NAME, - .owner = THIS_MODULE, }, .probe = stmpe_input_probe, .remove = stmpe_ts_remove, diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c index 2ba82602495..28a06749ae4 100644 --- a/drivers/input/touchscreen/sun4i-ts.c +++ b/drivers/input/touchscreen/sun4i-ts.c @@ -324,7 +324,6 @@ MODULE_DEVICE_TABLE(of, sun4i_ts_of_match); static struct platform_driver sun4i_ts_driver = { .driver = { - .owner = THIS_MODULE, .name = "sun4i-ts", .of_match_table = of_match_ptr(sun4i_ts_of_match), }, diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c index 2ce649520fe..004f1346a95 100644 --- a/drivers/input/touchscreen/ti_am335x_tsc.c +++ b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -518,7 +518,6 @@ static struct platform_driver ti_tsc_driver = { .remove = titsc_remove, .driver = { .name = "TI-am335x-tsc", - .owner = THIS_MODULE, .pm = TITSC_PM_OPS, .of_match_table = ti_tsc_dt_ids, }, diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c index 94cde2cb149..4ffd829d199 100644 --- a/drivers/input/touchscreen/tps6507x-ts.c +++ b/drivers/input/touchscreen/tps6507x-ts.c @@ -314,7 +314,6 @@ static int tps6507x_ts_remove(struct platform_device *pdev) static struct platform_driver tps6507x_ts_driver = { .driver = { .name = "tps6507x-ts", - .owner = THIS_MODULE, }, .probe = tps6507x_ts_probe, .remove = tps6507x_ts_remove, diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index bf132c45af1..c1e23cfc615 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c @@ -442,7 +442,6 @@ static struct platform_driver ucb1400_ts_driver = { .remove = ucb1400_ts_remove, .driver = { .name = "ucb1400_ts", - .owner = THIS_MODULE, .pm = &ucb1400_ts_pm_ops, }, }; diff --git a/drivers/input/touchscreen/w90p910_ts.c b/drivers/input/touchscreen/w90p910_ts.c index 003d0c3b5d0..da6004e9775 100644 --- a/drivers/input/touchscreen/w90p910_ts.c +++ b/drivers/input/touchscreen/w90p910_ts.c @@ -326,7 +326,6 @@ static struct platform_driver w90x900ts_driver = { .remove = w90x900ts_remove, .driver = { .name = "nuc900-ts", - .owner = THIS_MODULE, }, }; module_platform_driver(w90x900ts_driver); diff --git a/drivers/input/touchscreen/wm831x-ts.c b/drivers/input/touchscreen/wm831x-ts.c index 1b953a066b2..1db0a141092 100644 --- a/drivers/input/touchscreen/wm831x-ts.c +++ b/drivers/input/touchscreen/wm831x-ts.c @@ -392,7 +392,6 @@ static int wm831x_ts_remove(struct platform_device *pdev) static struct platform_driver wm831x_ts_driver = { .driver = { .name = "wm831x-touch", - .owner = THIS_MODULE, }, .probe = wm831x_ts_probe, .remove = wm831x_ts_remove, diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index d0ef91fc87d..b1ae7799596 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c @@ -70,11 +70,11 @@ * Documentation/input/input-programming.txt for more details. */ -static int abs_x[3] = {350, 3900, 5}; +static int abs_x[3] = {150, 4000, 5}; module_param_array(abs_x, int, NULL, 0); MODULE_PARM_DESC(abs_x, "Touchscreen absolute X min, max, fuzz"); -static int abs_y[3] = {320, 3750, 40}; +static int abs_y[3] = {200, 4000, 40}; module_param_array(abs_y, int, NULL, 0); MODULE_PARM_DESC(abs_y, "Touchscreen absolute Y min, max, fuzz"); |