aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@gmail.com>2014-05-07 04:27:57 -0400
committerThierry Reding <thierry.reding@gmail.com>2014-05-07 04:27:57 -0400
commit89c0339e0aa097384b3efed894b23820814c21d3 (patch)
tree8b3835ef8d76bee85a704aa7cc755846a16a1be9 /drivers/pwm
parent5b1e8e0653760ade53c0c7caaa9278c57361cb8b (diff)
pwm: lpss: Fix const qualifier and sparse warnings
Fixes the following warnings reported by the 0-DAY kernel build testing backend: drivers/pwm/pwm-lpss.c: In function 'pwm_lpss_probe_pci': >> drivers/pwm/pwm-lpss.c:192:2: warning: passing argument 3 of 'pwm_lpss_probe' discards 'const' qualifier from pointer target type [enabled by default] lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info); ^ drivers/pwm/pwm-lpss.c:130:30: note: expected 'struct pwm_lpss_boardinfo *' but argument is of type 'const struct pwm_lpss_boardinfo *' static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, ^ >> drivers/pwm/pwm-lpss.c:143:28: sparse: incorrect type in return expression (different address spaces) drivers/pwm/pwm-lpss.c:143:28: expected struct pwm_lpss_chip * drivers/pwm/pwm-lpss.c:143:28: got void [noderef] <asn:2>*regs >> drivers/pwm/pwm-lpss.c:192:63: sparse: incorrect type in argument 3 (different modifiers) drivers/pwm/pwm-lpss.c:192:63: expected struct pwm_lpss_boardinfo *info drivers/pwm/pwm-lpss.c:192:63: got struct pwm_lpss_boardinfo const *[assigned] info drivers/pwm/pwm-lpss.c: In function 'pwm_lpss_probe_pci': drivers/pwm/pwm-lpss.c:192:2: warning: passing argument 3 of 'pwm_lpss_probe' discards 'const' qualifier from pointer target type [enabled by default] lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info); ^ drivers/pwm/pwm-lpss.c:130:30: note: expected 'struct pwm_lpss_boardinfo *' but argument is of type 'const struct pwm_lpss_boardinfo *' static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, ^ Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-lpss.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-lpss.c b/drivers/pwm/pwm-lpss.c
index c718ad1df3bb..44ce6c6103ae 100644
--- a/drivers/pwm/pwm-lpss.c
+++ b/drivers/pwm/pwm-lpss.c
@@ -129,7 +129,7 @@ static const struct pwm_ops pwm_lpss_ops = {
129 129
130static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, 130static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
131 struct resource *r, 131 struct resource *r,
132 struct pwm_lpss_boardinfo *info) 132 const struct pwm_lpss_boardinfo *info)
133{ 133{
134 struct pwm_lpss_chip *lpwm; 134 struct pwm_lpss_chip *lpwm;
135 int ret; 135 int ret;
@@ -140,7 +140,7 @@ static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
140 140
141 lpwm->regs = devm_ioremap_resource(dev, r); 141 lpwm->regs = devm_ioremap_resource(dev, r);
142 if (IS_ERR(lpwm->regs)) 142 if (IS_ERR(lpwm->regs))
143 return lpwm->regs; 143 return ERR_CAST(lpwm->regs);
144 144
145 if (info) { 145 if (info) {
146 lpwm->clk_rate = info->clk_rate; 146 lpwm->clk_rate = info->clk_rate;