Skip to content

Commit

Permalink
pwm: Fill in missing .owner fields
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
thierryreding committed Jun 12, 2013
1 parent 88b613e commit 3dd0a90
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/pwm/pwm-atmel-tcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions drivers/pwm/pwm-bfin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions drivers/pwm/pwm-imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions drivers/pwm/pwm-lpc32xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions drivers/pwm/pwm-mxs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions drivers/pwm/pwm-pca9685.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
1 change: 1 addition & 0 deletions drivers/pwm/pwm-puv3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions drivers/pwm/pwm-spear.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions drivers/pwm/pwm-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3dd0a90

Please sign in to comment.