Skip to content

Commit 384461a

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: Manage owner assignment implicitly for drivers
Instead of requiring each driver to care for assigning the owner member of struct pwm_ops, handle that implicitly using a macro. Note that the owner member has to be moved to struct pwm_chip, as the ops structure usually lives in read-only memory and so cannot be modified. The upside is that new low level drivers cannot forget the assignment and save one line each. The pwm-crc driver didn't assign .owner, that's not a problem in practice though as the driver cannot be compiled as a module. Acked-by: Andy Shevchenko <[email protected]> # Intel LPSS Reviewed-by: Florian Fainelli <[email protected]> # pwm-{bcm,brcm}*.c Acked-by: Jernej Skrabec <[email protected]> # sun4i Acked-by: Andi Shyti <[email protected]> Acked-by: Nobuhiro Iwamatsu <[email protected]> # pwm-visconti Acked-by: Heiko Stuebner <[email protected]> # pwm-rockchip Acked-by: Michael Walle <[email protected]> # pwm-sl28cpld Acked-by: Neil Armstrong <[email protected]> # pwm-meson Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 7a3663c commit 384461a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+20
-82
lines changed

drivers/gpio/gpio-mvebu.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,6 @@ static const struct pwm_ops mvebu_pwm_ops = {
756756
.free = mvebu_pwm_free,
757757
.get_state = mvebu_pwm_get_state,
758758
.apply = mvebu_pwm_apply,
759-
.owner = THIS_MODULE,
760759
};
761760

762761
static void __maybe_unused mvebu_pwm_suspend(struct mvebu_gpio_chip *mvchip)

drivers/gpu/drm/bridge/ti-sn65dsi86.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,6 @@ static const struct pwm_ops ti_sn_pwm_ops = {
15801580
.free = ti_sn_pwm_free,
15811581
.apply = ti_sn_pwm_apply,
15821582
.get_state = ti_sn_pwm_get_state,
1583-
.owner = THIS_MODULE,
15841583
};
15851584

15861585
static int ti_sn_pwm_probe(struct auxiliary_device *adev,

drivers/leds/rgb/leds-qcom-lpg.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,6 @@ static const struct pwm_ops lpg_pwm_ops = {
10851085
.request = lpg_pwm_request,
10861086
.apply = lpg_pwm_apply,
10871087
.get_state = lpg_pwm_get_state,
1088-
.owner = THIS_MODULE,
10891088
};
10901089

10911090
static int lpg_add_pwm(struct lpg *lpg)

drivers/pwm/core.c

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ static int pwm_device_request(struct pwm_device *pwm, const char *label)
8989
if (test_bit(PWMF_REQUESTED, &pwm->flags))
9090
return -EBUSY;
9191

92-
if (!try_module_get(pwm->chip->ops->owner))
92+
if (!try_module_get(pwm->chip->owner))
9393
return -ENODEV;
9494

9595
if (pwm->chip->ops->request) {
9696
err = pwm->chip->ops->request(pwm->chip, pwm);
9797
if (err) {
98-
module_put(pwm->chip->ops->owner);
98+
module_put(pwm->chip->owner);
9999
return err;
100100
}
101101
}
@@ -253,14 +253,16 @@ static bool pwm_ops_check(const struct pwm_chip *chip)
253253
}
254254

255255
/**
256-
* pwmchip_add() - register a new PWM chip
256+
* __pwmchip_add() - register a new PWM chip
257257
* @chip: the PWM chip to add
258+
* @owner: reference to the module providing the chip.
258259
*
259-
* Register a new PWM chip.
260+
* Register a new PWM chip. @owner is supposed to be THIS_MODULE, use the
261+
* pwmchip_add wrapper to do this right.
260262
*
261263
* Returns: 0 on success or a negative error code on failure.
262264
*/
263-
int pwmchip_add(struct pwm_chip *chip)
265+
int __pwmchip_add(struct pwm_chip *chip, struct module *owner)
264266
{
265267
struct pwm_device *pwm;
266268
unsigned int i;
@@ -272,6 +274,8 @@ int pwmchip_add(struct pwm_chip *chip)
272274
if (!pwm_ops_check(chip))
273275
return -EINVAL;
274276

277+
chip->owner = owner;
278+
275279
chip->pwms = kcalloc(chip->npwm, sizeof(*pwm), GFP_KERNEL);
276280
if (!chip->pwms)
277281
return -ENOMEM;
@@ -306,7 +310,7 @@ int pwmchip_add(struct pwm_chip *chip)
306310

307311
return 0;
308312
}
309-
EXPORT_SYMBOL_GPL(pwmchip_add);
313+
EXPORT_SYMBOL_GPL(__pwmchip_add);
310314

311315
/**
312316
* pwmchip_remove() - remove a PWM chip
@@ -338,17 +342,17 @@ static void devm_pwmchip_remove(void *data)
338342
pwmchip_remove(chip);
339343
}
340344

341-
int devm_pwmchip_add(struct device *dev, struct pwm_chip *chip)
345+
int __devm_pwmchip_add(struct device *dev, struct pwm_chip *chip, struct module *owner)
342346
{
343347
int ret;
344348

345-
ret = pwmchip_add(chip);
349+
ret = __pwmchip_add(chip, owner);
346350
if (ret)
347351
return ret;
348352

349353
return devm_add_action_or_reset(dev, devm_pwmchip_remove, chip);
350354
}
351-
EXPORT_SYMBOL_GPL(devm_pwmchip_add);
355+
EXPORT_SYMBOL_GPL(__devm_pwmchip_add);
352356

353357
/**
354358
* pwm_request_from_chip() - request a PWM device relative to a PWM chip
@@ -979,7 +983,7 @@ void pwm_put(struct pwm_device *pwm)
979983
pwm_set_chip_data(pwm, NULL);
980984
pwm->label = NULL;
981985

982-
module_put(pwm->chip->ops->owner);
986+
module_put(pwm->chip->owner);
983987
out:
984988
mutex_unlock(&pwm_lock);
985989
}

drivers/pwm/pwm-ab8500.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ static int ab8500_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
181181
static const struct pwm_ops ab8500_pwm_ops = {
182182
.apply = ab8500_pwm_apply,
183183
.get_state = ab8500_pwm_get_state,
184-
.owner = THIS_MODULE,
185184
};
186185

187186
static int ab8500_pwm_probe(struct platform_device *pdev)

drivers/pwm/pwm-apple.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ static int apple_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
9999
static const struct pwm_ops apple_pwm_ops = {
100100
.apply = apple_pwm_apply,
101101
.get_state = apple_pwm_get_state,
102-
.owner = THIS_MODULE,
103102
};
104103

105104
static int apple_pwm_probe(struct platform_device *pdev)

drivers/pwm/pwm-atmel-hlcdc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ static int atmel_hlcdc_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
170170

171171
static const struct pwm_ops atmel_hlcdc_pwm_ops = {
172172
.apply = atmel_hlcdc_pwm_apply,
173-
.owner = THIS_MODULE,
174173
};
175174

176175
static const struct atmel_hlcdc_pwm_errata atmel_hlcdc_pwm_at91sam9x5_errata = {

drivers/pwm/pwm-atmel-tcb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ static const struct pwm_ops atmel_tcb_pwm_ops = {
364364
.request = atmel_tcb_pwm_request,
365365
.free = atmel_tcb_pwm_free,
366366
.apply = atmel_tcb_pwm_apply,
367-
.owner = THIS_MODULE,
368367
};
369368

370369
static struct atmel_tcb_config tcb_rm9200_config = {

drivers/pwm/pwm-atmel.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,6 @@ static int atmel_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
402402
static const struct pwm_ops atmel_pwm_ops = {
403403
.apply = atmel_pwm_apply,
404404
.get_state = atmel_pwm_get_state,
405-
.owner = THIS_MODULE,
406405
};
407406

408407
static const struct atmel_pwm_data atmel_sam9rl_pwm_data = {

drivers/pwm/pwm-bcm-iproc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ static int iproc_pwmc_apply(struct pwm_chip *chip, struct pwm_device *pwm,
183183
static const struct pwm_ops iproc_pwm_ops = {
184184
.apply = iproc_pwmc_apply,
185185
.get_state = iproc_pwmc_get_state,
186-
.owner = THIS_MODULE,
187186
};
188187

189188
static int iproc_pwmc_probe(struct platform_device *pdev)

drivers/pwm/pwm-bcm-kona.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ static int kona_pwmc_apply(struct pwm_chip *chip, struct pwm_device *pwm,
269269

270270
static const struct pwm_ops kona_pwm_ops = {
271271
.apply = kona_pwmc_apply,
272-
.owner = THIS_MODULE,
273272
};
274273

275274
static int kona_pwmc_probe(struct platform_device *pdev)

drivers/pwm/pwm-bcm2835.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ static const struct pwm_ops bcm2835_pwm_ops = {
129129
.request = bcm2835_pwm_request,
130130
.free = bcm2835_pwm_free,
131131
.apply = bcm2835_pwm_apply,
132-
.owner = THIS_MODULE,
133132
};
134133

135134
static int bcm2835_pwm_probe(struct platform_device *pdev)

drivers/pwm/pwm-berlin.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ static const struct pwm_ops berlin_pwm_ops = {
205205
.request = berlin_pwm_request,
206206
.free = berlin_pwm_free,
207207
.apply = berlin_pwm_apply,
208-
.owner = THIS_MODULE,
209208
};
210209

211210
static const struct of_device_id berlin_pwm_match[] = {

drivers/pwm/pwm-brcmstb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ static int brcmstb_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
220220

221221
static const struct pwm_ops brcmstb_pwm_ops = {
222222
.apply = brcmstb_pwm_apply,
223-
.owner = THIS_MODULE,
224223
};
225224

226225
static const struct of_device_id brcmstb_pwm_of_match[] = {

drivers/pwm/pwm-clk.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ static int pwm_clk_apply(struct pwm_chip *chip, struct pwm_device *pwm,
7777

7878
static const struct pwm_ops pwm_clk_ops = {
7979
.apply = pwm_clk_apply,
80-
.owner = THIS_MODULE,
8180
};
8281

8382
static int pwm_clk_probe(struct platform_device *pdev)

drivers/pwm/pwm-clps711x.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ static int clps711x_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
7272
static const struct pwm_ops clps711x_pwm_ops = {
7373
.request = clps711x_pwm_request,
7474
.apply = clps711x_pwm_apply,
75-
.owner = THIS_MODULE,
7675
};
7776

7877
static struct pwm_device *clps711x_pwm_xlate(struct pwm_chip *chip,

drivers/pwm/pwm-cros-ec.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ static const struct pwm_ops cros_ec_pwm_ops = {
241241
.free = cros_ec_pwm_free,
242242
.get_state = cros_ec_pwm_get_state,
243243
.apply = cros_ec_pwm_apply,
244-
.owner = THIS_MODULE,
245244
};
246245

247246
/*

drivers/pwm/pwm-dwc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ static int dwc_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
195195
static const struct pwm_ops dwc_pwm_ops = {
196196
.apply = dwc_pwm_apply,
197197
.get_state = dwc_pwm_get_state,
198-
.owner = THIS_MODULE,
199198
};
200199

201200
static struct dwc_pwm *dwc_pwm_alloc(struct device *dev)

drivers/pwm/pwm-ep93xx.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ static const struct pwm_ops ep93xx_pwm_ops = {
159159
.request = ep93xx_pwm_request,
160160
.free = ep93xx_pwm_free,
161161
.apply = ep93xx_pwm_apply,
162-
.owner = THIS_MODULE,
163162
};
164163

165164
static int ep93xx_pwm_probe(struct platform_device *pdev)

drivers/pwm/pwm-fsl-ftm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ static const struct pwm_ops fsl_pwm_ops = {
350350
.request = fsl_pwm_request,
351351
.free = fsl_pwm_free,
352352
.apply = fsl_pwm_apply,
353-
.owner = THIS_MODULE,
354353
};
355354

356355
static int fsl_pwm_init(struct fsl_pwm_chip *fpc)

drivers/pwm/pwm-hibvt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ static const struct pwm_ops hibvt_pwm_ops = {
185185
.get_state = hibvt_pwm_get_state,
186186
.apply = hibvt_pwm_apply,
187187

188-
.owner = THIS_MODULE,
189188
};
190189

191190
static int hibvt_pwm_probe(struct platform_device *pdev)

drivers/pwm/pwm-img.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ static int img_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
208208

209209
static const struct pwm_ops img_pwm_ops = {
210210
.apply = img_pwm_apply,
211-
.owner = THIS_MODULE,
212211
};
213212

214213
static const struct img_pwm_soc_data pistachio_pwm = {

drivers/pwm/pwm-imx-tpm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ static const struct pwm_ops imx_tpm_pwm_ops = {
332332
.free = pwm_imx_tpm_free,
333333
.get_state = pwm_imx_tpm_get_state,
334334
.apply = pwm_imx_tpm_apply,
335-
.owner = THIS_MODULE,
336335
};
337336

338337
static int pwm_imx_tpm_probe(struct platform_device *pdev)

drivers/pwm/pwm-imx1.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ static int pwm_imx1_apply(struct pwm_chip *chip, struct pwm_device *pwm,
146146

147147
static const struct pwm_ops pwm_imx1_ops = {
148148
.apply = pwm_imx1_apply,
149-
.owner = THIS_MODULE,
150149
};
151150

152151
static const struct of_device_id pwm_imx1_dt_ids[] = {

drivers/pwm/pwm-imx27.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ static int pwm_imx27_apply(struct pwm_chip *chip, struct pwm_device *pwm,
296296
static const struct pwm_ops pwm_imx27_ops = {
297297
.apply = pwm_imx27_apply,
298298
.get_state = pwm_imx27_get_state,
299-
.owner = THIS_MODULE,
300299
};
301300

302301
static const struct of_device_id pwm_imx27_dt_ids[] = {

drivers/pwm/pwm-intel-lgm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ static int lgm_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
107107
static const struct pwm_ops lgm_pwm_ops = {
108108
.get_state = lgm_pwm_get_state,
109109
.apply = lgm_pwm_apply,
110-
.owner = THIS_MODULE,
111110
};
112111

113112
static void lgm_pwm_init(struct lgm_pwm_chip *pc)

drivers/pwm/pwm-iqs620a.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ static int iqs620_pwm_notifier(struct notifier_block *notifier,
166166
static const struct pwm_ops iqs620_pwm_ops = {
167167
.apply = iqs620_pwm_apply,
168168
.get_state = iqs620_pwm_get_state,
169-
.owner = THIS_MODULE,
170169
};
171170

172171
static void iqs620_pwm_notifier_unregister(void *context)

drivers/pwm/pwm-jz4740.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ static const struct pwm_ops jz4740_pwm_ops = {
216216
.request = jz4740_pwm_request,
217217
.free = jz4740_pwm_free,
218218
.apply = jz4740_pwm_apply,
219-
.owner = THIS_MODULE,
220219
};
221220

222221
static int jz4740_pwm_probe(struct platform_device *pdev)

drivers/pwm/pwm-keembay.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ static int keembay_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
178178
}
179179

180180
static const struct pwm_ops keembay_pwm_ops = {
181-
.owner = THIS_MODULE,
182181
.apply = keembay_pwm_apply,
183182
.get_state = keembay_pwm_get_state,
184183
};

drivers/pwm/pwm-lp3943.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ static const struct pwm_ops lp3943_pwm_ops = {
216216
.request = lp3943_pwm_request,
217217
.free = lp3943_pwm_free,
218218
.apply = lp3943_pwm_apply,
219-
.owner = THIS_MODULE,
220219
};
221220

222221
static int lp3943_pwm_parse_dt(struct device *dev,

drivers/pwm/pwm-lpc18xx-sct.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ static const struct pwm_ops lpc18xx_pwm_ops = {
341341
.apply = lpc18xx_pwm_apply,
342342
.request = lpc18xx_pwm_request,
343343
.free = lpc18xx_pwm_free,
344-
.owner = THIS_MODULE,
345344
};
346345

347346
static const struct of_device_id lpc18xx_pwm_of_match[] = {

drivers/pwm/pwm-lpc32xx.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ static int lpc32xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
115115

116116
static const struct pwm_ops lpc32xx_pwm_ops = {
117117
.apply = lpc32xx_pwm_apply,
118-
.owner = THIS_MODULE,
119118
};
120119

121120
static int lpc32xx_pwm_probe(struct platform_device *pdev)

drivers/pwm/pwm-lpss.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ static int pwm_lpss_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
243243
static const struct pwm_ops pwm_lpss_ops = {
244244
.apply = pwm_lpss_apply,
245245
.get_state = pwm_lpss_get_state,
246-
.owner = THIS_MODULE,
247246
};
248247

249248
struct pwm_lpss_chip *devm_pwm_lpss_probe(struct device *dev, void __iomem *base,

drivers/pwm/pwm-mediatek.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ static int pwm_mediatek_apply(struct pwm_chip *chip, struct pwm_device *pwm,
229229

230230
static const struct pwm_ops pwm_mediatek_ops = {
231231
.apply = pwm_mediatek_apply,
232-
.owner = THIS_MODULE,
233232
};
234233

235234
static int pwm_mediatek_probe(struct platform_device *pdev)

drivers/pwm/pwm-meson.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ static const struct pwm_ops meson_pwm_ops = {
335335
.free = meson_pwm_free,
336336
.apply = meson_pwm_apply,
337337
.get_state = meson_pwm_get_state,
338-
.owner = THIS_MODULE,
339338
};
340339

341340
static const char * const pwm_meson8b_parent_names[] = {

drivers/pwm/pwm-microchip-core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ static int mchp_core_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm
435435
static const struct pwm_ops mchp_core_pwm_ops = {
436436
.apply = mchp_core_pwm_apply,
437437
.get_state = mchp_core_pwm_get_state,
438-
.owner = THIS_MODULE,
439438
};
440439

441440
static const struct of_device_id mchp_core_of_match[] = {

drivers/pwm/pwm-mtk-disp.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ static int mtk_disp_pwm_get_state(struct pwm_chip *chip,
227227
static const struct pwm_ops mtk_disp_pwm_ops = {
228228
.apply = mtk_disp_pwm_apply,
229229
.get_state = mtk_disp_pwm_get_state,
230-
.owner = THIS_MODULE,
231230
};
232231

233232
static int mtk_disp_pwm_probe(struct platform_device *pdev)

drivers/pwm/pwm-mxs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ static int mxs_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
115115

116116
static const struct pwm_ops mxs_pwm_ops = {
117117
.apply = mxs_pwm_apply,
118-
.owner = THIS_MODULE,
119118
};
120119

121120
static int mxs_pwm_probe(struct platform_device *pdev)

drivers/pwm/pwm-ntxec.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ static int ntxec_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm_dev,
126126
}
127127

128128
static const struct pwm_ops ntxec_pwm_ops = {
129-
.owner = THIS_MODULE,
130129
.apply = ntxec_pwm_apply,
131130
/*
132131
* No .get_state callback, because the current state cannot be read

drivers/pwm/pwm-omap-dmtimer.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ static int pwm_omap_dmtimer_apply(struct pwm_chip *chip,
311311

312312
static const struct pwm_ops pwm_omap_dmtimer_ops = {
313313
.apply = pwm_omap_dmtimer_apply,
314-
.owner = THIS_MODULE,
315314
};
316315

317316
static int pwm_omap_dmtimer_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)