aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/htc-pasic3.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/mfd/htc-pasic3.c b/drivers/mfd/htc-pasic3.c
index 4edc120a6359..633cbba072f0 100644
--- a/drivers/mfd/htc-pasic3.c
+++ b/drivers/mfd/htc-pasic3.c
@@ -132,8 +132,9 @@ static struct ds1wm_platform_data ds1wm_pdata = {
132 .disable = ds1wm_disable, 132 .disable = ds1wm_disable,
133}; 133};
134 134
135static int ds1wm_device_add(struct device *pasic3_dev, int bus_shift) 135static int ds1wm_device_add(struct platform_device *pasic3_pdev, int bus_shift)
136{ 136{
137 struct device *pasic3_dev = &pasic3_pdev->dev;
137 struct pasic3_data *asic = pasic3_dev->driver_data; 138 struct pasic3_data *asic = pasic3_dev->driver_data;
138 struct platform_device *pdev; 139 struct platform_device *pdev;
139 int ret; 140 int ret;
@@ -144,8 +145,8 @@ static int ds1wm_device_add(struct device *pasic3_dev, int bus_shift)
144 return -ENOMEM; 145 return -ENOMEM;
145 } 146 }
146 147
147 ret = platform_device_add_resources(pdev, pdev->resource, 148 ret = platform_device_add_resources(pdev, pasic3_pdev->resource,
148 pdev->num_resources); 149 pasic3_pdev->num_resources);
149 if (ret < 0) { 150 if (ret < 0) {
150 dev_dbg(pasic3_dev, "failed to add DS1WM resources\n"); 151 dev_dbg(pasic3_dev, "failed to add DS1WM resources\n");
151 goto exit_pdev_put; 152 goto exit_pdev_put;
@@ -207,7 +208,7 @@ static int __init pasic3_probe(struct platform_device *pdev)
207 return -ENOMEM; 208 return -ENOMEM;
208 } 209 }
209 210
210 ret = ds1wm_device_add(dev, asic->bus_shift); 211 ret = ds1wm_device_add(pdev, asic->bus_shift);
211 if (ret < 0) 212 if (ret < 0)
212 dev_warn(dev, "failed to register DS1WM\n"); 213 dev_warn(dev, "failed to register DS1WM\n");
213 214