pwm: Fill in missing .owner fields
authorThierry Reding <thierry.reding@gmail.com>
Wed, 12 Jun 2013 11:18:29 +0000 (13:18 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 12 Jun 2013 11:18:29 +0000 (13:18 +0200)
Some drivers don't set the .owner fields of the struct device_driver or
struct pwm_ops, which causes the module usage count to become wrong.

Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-atmel-tcb.c
drivers/pwm/pwm-bfin.c
drivers/pwm/pwm-imx.c
drivers/pwm/pwm-lpc32xx.c
drivers/pwm/pwm-mxs.c
drivers/pwm/pwm-pca9685.c
drivers/pwm/pwm-puv3.c
drivers/pwm/pwm-spear.c
drivers/pwm/pwm-tegra.c

index 09be626a61a03a683e841fbe3813fb6a88763cad..ba6ce01035e4feae2c1f40dcf8b24e0ad4923ffa 100644 (file)
@@ -434,6 +434,7 @@ MODULE_DEVICE_TABLE(of, atmel_tcb_pwm_dt_ids);
 static struct platform_driver atmel_tcb_pwm_driver = {
        .driver = {
                .name = "atmel-tcb-pwm",
+               .owner = THIS_MODULE,
                .of_match_table = atmel_tcb_pwm_dt_ids,
        },
        .probe = atmel_tcb_pwm_probe,
index 7631ef194de7dc80ba28b98da9b340e519ac5095..9985d830e554856dd8e96eb9667da4ad64923793 100644 (file)
@@ -149,6 +149,7 @@ static int bfin_pwm_remove(struct platform_device *pdev)
 static struct platform_driver bfin_pwm_driver = {
        .driver = {
                .name = "bfin-pwm",
+               .owner = THIS_MODULE,
        },
        .probe = bfin_pwm_probe,
        .remove = bfin_pwm_remove,
index c938bae18812ea5768e77b48ee2b0f1a6e39b24f..2b7c4f88b461b788c1d683a141d6a402d958af12 100644 (file)
@@ -295,6 +295,7 @@ static int imx_pwm_remove(struct platform_device *pdev)
 static struct platform_driver imx_pwm_driver = {
        .driver         = {
                .name   = "imx-pwm",
+               .owner = THIS_MODULE,
                .of_match_table = of_match_ptr(imx_pwm_dt_ids),
        },
        .probe          = imx_pwm_probe,
index 8272883c0d05f73e63c887aa7b90160e0346e4ae..efb6c7bf8750f0ffc8f31e956e1fbdaff8358e6b 100644 (file)
@@ -171,6 +171,7 @@ MODULE_DEVICE_TABLE(of, lpc32xx_pwm_dt_ids);
 static struct platform_driver lpc32xx_pwm_driver = {
        .driver = {
                .name = "lpc32xx-pwm",
+               .owner = THIS_MODULE,
                .of_match_table = of_match_ptr(lpc32xx_pwm_dt_ids),
        },
        .probe = lpc32xx_pwm_probe,
index 6489a4b759437236d803a52dc657fc5090ef5922..2c77b81da7c4a7fb50c70f94904ad5312a791a85 100644 (file)
@@ -182,6 +182,7 @@ MODULE_DEVICE_TABLE(of, mxs_pwm_dt_ids);
 static struct platform_driver mxs_pwm_driver = {
        .driver = {
                .name = "mxs-pwm",
+               .owner = THIS_MODULE,
                .of_match_table = of_match_ptr(mxs_pwm_dt_ids),
        },
        .probe = mxs_pwm_probe,
index 2afc9043550a201bf3d8494dbc00b5de89bc0a14..c9f9e65415f3f70e8dcfd464dfef640a2f855f12 100644 (file)
@@ -199,6 +199,7 @@ static const struct pwm_ops pca9685_pwm_ops = {
        .config = pca9685_pwm_config,
        .request = pca9685_pwm_request,
        .free = pca9685_pwm_free,
+       .owner = THIS_MODULE,
 };
 
 static struct regmap_config pca9685_regmap_i2c_config = {
index ed6007b27585a9512d5c2470248343b3e80882d4..a9a28083f245ca2f5efa8be46c6b3b79690170db 100644 (file)
@@ -146,6 +146,7 @@ static int pwm_remove(struct platform_device *pdev)
 static struct platform_driver puv3_pwm_driver = {
        .driver = {
                .name = "PKUnity-v3-PWM",
+               .owner = THIS_MODULE,
        },
        .probe = pwm_probe,
        .remove = pwm_remove,
index 6d99e2cbdc739eb0c4dd84a998d6d69a37013402..a54d21401431d6caeb06b7ecd75da5b15c02fbfe 100644 (file)
@@ -259,6 +259,7 @@ MODULE_DEVICE_TABLE(of, spear_pwm_of_match);
 static struct platform_driver spear_pwm_driver = {
        .driver = {
                .name = "spear-pwm",
+               .owner = THIS_MODULE,
                .of_match_table = spear_pwm_of_match,
        },
        .probe = spear_pwm_probe,
index a5402933001f9cf446192d79b1ddf204e748e2a1..74298c561c4e57f303f675a13987f6b70ecb5dc4 100644 (file)
@@ -239,6 +239,7 @@ MODULE_DEVICE_TABLE(of, tegra_pwm_of_match);
 static struct platform_driver tegra_pwm_driver = {
        .driver = {
                .name = "tegra-pwm",
+               .owner = THIS_MODULE,
                .of_match_table = tegra_pwm_of_match,
        },
        .probe = tegra_pwm_probe,