From 95afae481414cbdb0567bf82d5e5077c3ac9da20 Mon Sep 17 00:00:00 2001 From: David Vrabel Date: Mon, 8 Sep 2014 17:30:41 +0100 Subject: xen: remove DEFINE_XENBUS_DRIVER() macro The DEFINE_XENBUS_DRIVER() macro looks a bit weird and causes sparse errors. Replace the uses with standard structure definitions instead. This is similar to pci and usb device registration. Signed-off-by: David Vrabel --- drivers/input/misc/xen-kbdfront.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/input/misc') diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c index fbfdc10573b..1af28b06c71 100644 --- a/drivers/input/misc/xen-kbdfront.c +++ b/drivers/input/misc/xen-kbdfront.c @@ -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) { -- cgit v1.2.3-70-g09d2 From 4d544e3bdb12f8e48f61e7f2270b253a48c69e00 Mon Sep 17 00:00:00 2001 From: Chang Huaixin Date: Thu, 16 Oct 2014 13:33:24 -0700 Subject: Input: xen-kbdfront - free grant table entry in xenkbd_disconnect_backend xenkbd_disconnect_backend doesn't free grant table entry. This bug affects live migration. xenkbd_disconnect_backend uses gnttab_end_foreign_access_ref to handle grant table entry which doesn't really free an entry. Thus every time we do xenkbd_resume, grant table entry increses by one. As an grant table entry occupies 8 bytes, an grant table page has at most 512 entries. Every 512 times we do xenkdb_resume, grant table pages increses by one. After around 3500 times of live migration, grant table pages will increase by 7, causing too many pages to populate and hitting max_pages limit when assigning pages.Thus assign_pages will fail, so will live migration. Signed-off-by: Chang Huaixin Acked-by: David Vrabel Signed-off-by: Dmitry Torokhov --- drivers/input/misc/xen-kbdfront.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input/misc') diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c index fbfdc10573b..e2ecfc6e633 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; } -- cgit v1.2.3-70-g09d2 From 135d916fe8a5fa25ad87a62844acfd3dbb1c9fb9 Mon Sep 17 00:00:00 2001 From: Jaewon Kim Date: Thu, 16 Oct 2014 13:56:52 -0700 Subject: Input: max77693-haptic - fix state check in imax77693_haptic_disable() The check to see whether the device is already disabled in max77693_haptic_disable() was inversed, this change corrects it. Signed-off-by: Jaewon Kim Reviewed-by: Chanwoo Choi Signed-off-by: Dmitry Torokhov --- drivers/input/misc/max77693-haptic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/misc') diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c index d605db4d2f3..7b1fde93799 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); -- cgit v1.2.3-70-g09d2 From 776bd315a7721574d7d687dd9abf200735d12a2a Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Mon, 20 Oct 2014 16:20:40 +0200 Subject: input: misc: drop owner assignment from platform_drivers A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang --- drivers/input/misc/88pm80x_onkey.c | 1 - drivers/input/misc/88pm860x_onkey.c | 1 - drivers/input/misc/ab8500-ponkey.c | 1 - drivers/input/misc/arizona-haptics.c | 1 - drivers/input/misc/bfin_rotary.c | 1 - drivers/input/misc/cobalt_btns.c | 1 - drivers/input/misc/da9052_onkey.c | 1 - drivers/input/misc/da9055_onkey.c | 1 - drivers/input/misc/dm355evm_keys.c | 1 - drivers/input/misc/gpio-beeper.c | 1 - drivers/input/misc/gpio_tilt_polled.c | 1 - drivers/input/misc/ideapad_slidebar.c | 1 - drivers/input/misc/ixp4xx-beeper.c | 1 - drivers/input/misc/m68kspkr.c | 1 - drivers/input/misc/max77693-haptic.c | 1 - drivers/input/misc/max8925_onkey.c | 1 - drivers/input/misc/max8997_haptic.c | 1 - drivers/input/misc/mc13783-pwrbutton.c | 1 - drivers/input/misc/palmas-pwrbutton.c | 1 - drivers/input/misc/pcap_keys.c | 1 - drivers/input/misc/pcspkr.c | 1 - drivers/input/misc/pm8xxx-vibrator.c | 1 - drivers/input/misc/pmic8xxx-pwrkey.c | 1 - drivers/input/misc/pwm-beeper.c | 1 - drivers/input/misc/rb532_button.c | 1 - drivers/input/misc/retu-pwrbutton.c | 1 - drivers/input/misc/rotary_encoder.c | 1 - drivers/input/misc/sgi_btns.c | 1 - drivers/input/misc/sirfsoc-onkey.c | 1 - drivers/input/misc/soc_button_array.c | 1 - drivers/input/misc/sparcspkr.c | 2 -- drivers/input/misc/twl4030-pwrbutton.c | 1 - drivers/input/misc/twl4030-vibra.c | 1 - drivers/input/misc/twl6040-vibra.c | 1 - drivers/input/misc/wistron_btns.c | 1 - drivers/input/misc/wm831x-on.c | 1 - 36 files changed, 37 deletions(-) (limited to 'drivers/input/misc') 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 220ce0fa15d..cfdca6e9977 100644 --- a/drivers/input/misc/88pm860x_onkey.c +++ b/drivers/input/misc/88pm860x_onkey.c @@ -138,7 +138,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/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 7b1fde93799..bdc40304113 100644 --- a/drivers/input/misc/max77693-haptic.c +++ b/drivers/input/misc/max77693-haptic.c @@ -344,7 +344,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 3809618e6a5..297e2a9169d 100644 --- a/drivers/input/misc/max8925_onkey.c +++ b/drivers/input/misc/max8925_onkey.c @@ -168,7 +168,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 a363ebbd9cc..5b3154edf82 100644 --- a/drivers/input/misc/max8997_haptic.c +++ b/drivers/input/misc/max8997_haptic.c @@ -401,7 +401,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 f505ac3a8d8..066c5ab632c 100644 --- a/drivers/input/misc/palmas-pwrbutton.c +++ b/drivers/input/misc/palmas-pwrbutton.c @@ -319,7 +319,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 6a915ba31bb..e9c77a95717 100644 --- a/drivers/input/misc/pm8xxx-vibrator.c +++ b/drivers/input/misc/pm8xxx-vibrator.c @@ -224,7 +224,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 c91e3d33aea..cb799177cbd 100644 --- a/drivers/input/misc/pmic8xxx-pwrkey.c +++ b/drivers/input/misc/pmic8xxx-pwrkey.c @@ -195,7 +195,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 8ef288e7c97..294aa48bad5 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 fed5102e180..4faf9f8d124 100644 --- a/drivers/input/misc/sirfsoc-onkey.c +++ b/drivers/input/misc/sirfsoc-onkey.c @@ -205,7 +205,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..e9e4d6a6741 100644 --- a/drivers/input/misc/soc_button_array.c +++ b/drivers/input/misc/soc_button_array.c @@ -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..380580e77f9 100644 --- a/drivers/input/misc/twl4030-pwrbutton.c +++ b/drivers/input/misc/twl4030-pwrbutton.c @@ -101,7 +101,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 960ef2a7091..ccd6dd18f8f 100644 --- a/drivers/input/misc/twl4030-vibra.c +++ b/drivers/input/misc/twl4030-vibra.c @@ -253,7 +253,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 6d26eecc278..96e0e0c0ccb 100644 --- a/drivers/input/misc/twl6040-vibra.c +++ b/drivers/input/misc/twl6040-vibra.c @@ -388,7 +388,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); -- cgit v1.2.3-70-g09d2 From 4668546f99df6413be19d370c448c6b4b37fb5bc Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Thu, 23 Oct 2014 08:53:13 -0700 Subject: Input: soc_button_array - update calls to gpiod_get*() Add the new flags argument to calls of (devm_)gpiod_get*(). Currently both forms (with or without the flags argument) are valid thanks to transitional macros in . These macros will be removed once all consumers are updated and the flags argument will become compulsory. Signed-off-by: Alexandre Courbot Signed-off-by: Dmitry Torokhov --- drivers/input/misc/soc_button_array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/misc') diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c index 73560475356..e097f1ab427 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); -- cgit v1.2.3-70-g09d2 From 60183a6e93ac62727161d1a94abd80e2d7d901d0 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Fri, 24 Oct 2014 15:10:47 -0700 Subject: Input: ims-pcu - fix dead code in ims_pcu_ofn_reg_addr_store() Coverity pointed out that at return point error is always 0 so the conditional is not needed. Signed-off-by: Dmitry Torokhov --- drivers/input/misc/ims-pcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/misc') diff --git a/drivers/input/misc/ims-pcu.c b/drivers/input/misc/ims-pcu.c index 719410feb84..afed8e2b2f9 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, -- cgit v1.2.3-70-g09d2 From fbefc5e7e63228d56963eeb0db10209ea0fafe9d Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Tue, 28 Oct 2014 09:27:58 -0700 Subject: Input: max77693-haptic - fix potential overflow Expression haptic->pwm_dev->period * haptic->magnitude is of type 'unsigned int' and may overflow. We need to convert one of the operands to u64 before multiplying, instead of casting result (potentially overflown) to u64. Reported by Coverity: CID 1248753 Acked-by : Jaewon Kim Reviewed-by: Chanwoo Choi Signed-off-by: Dmitry Torokhov --- drivers/input/misc/max77693-haptic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/input/misc') diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c index 7b1fde93799..ef6a9d650d6 100644 --- a/drivers/input/misc/max77693-haptic.c +++ b/drivers/input/misc/max77693-haptic.c @@ -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); -- cgit v1.2.3-70-g09d2 From c42bfd7f6cd26e8f712fc184460e32845d928d17 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 7 Nov 2014 15:46:56 -0800 Subject: Input: twl4030-pwrbutton - ensure a wakeup event is recorded. This button is treated as a wakeup source, so we need to initialise it correctly. Without the device_init_wakeup() call, dev->power.wakeup will be NULL, and pm_wakeup_event() will do nothing. Signed-off-by: NeilBrown Signed-off-by: Dmitry Torokhov --- drivers/input/misc/twl4030-pwrbutton.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/input/misc') diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c index fb3b63b2f85..8400a1a34d8 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; } -- cgit v1.2.3-70-g09d2