diff options
Diffstat (limited to 'drivers/mfd/htc-pasic3.c')
-rw-r--r-- | drivers/mfd/htc-pasic3.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/mfd/htc-pasic3.c b/drivers/mfd/htc-pasic3.c index f04300e05fd6..04c7093d6499 100644 --- a/drivers/mfd/htc-pasic3.c +++ b/drivers/mfd/htc-pasic3.c | |||
@@ -99,6 +99,7 @@ static int ds1wm_disable(struct platform_device *pdev) | |||
99 | 99 | ||
100 | static struct ds1wm_driver_data ds1wm_pdata = { | 100 | static struct ds1wm_driver_data ds1wm_pdata = { |
101 | .active_high = 0, | 101 | .active_high = 0, |
102 | .reset_recover_delay = 1, | ||
102 | }; | 103 | }; |
103 | 104 | ||
104 | static struct resource ds1wm_resources[] __initdata = { | 105 | static struct resource ds1wm_resources[] __initdata = { |
@@ -117,7 +118,8 @@ static struct mfd_cell ds1wm_cell __initdata = { | |||
117 | .name = "ds1wm", | 118 | .name = "ds1wm", |
118 | .enable = ds1wm_enable, | 119 | .enable = ds1wm_enable, |
119 | .disable = ds1wm_disable, | 120 | .disable = ds1wm_disable, |
120 | .driver_data = &ds1wm_pdata, | 121 | .platform_data = &ds1wm_pdata, |
122 | .pdata_size = sizeof(ds1wm_pdata), | ||
121 | .num_resources = 2, | 123 | .num_resources = 2, |
122 | .resources = ds1wm_resources, | 124 | .resources = ds1wm_resources, |
123 | }; | 125 | }; |
@@ -138,13 +140,6 @@ static int __init pasic3_probe(struct platform_device *pdev) | |||
138 | irq = r->start; | 140 | irq = r->start; |
139 | } | 141 | } |
140 | 142 | ||
141 | r = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | ||
142 | if (r) { | ||
143 | ds1wm_resources[1].flags = IORESOURCE_IRQ | (r->flags & | ||
144 | (IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE)); | ||
145 | irq = r->start; | ||
146 | } | ||
147 | |||
148 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 143 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
149 | if (!r) | 144 | if (!r) |
150 | return -ENXIO; | 145 | return -ENXIO; |
@@ -172,8 +167,6 @@ static int __init pasic3_probe(struct platform_device *pdev) | |||
172 | ds1wm_pdata.clock_rate = pdata->clock_rate; | 167 | ds1wm_pdata.clock_rate = pdata->clock_rate; |
173 | /* the first 5 PASIC3 registers control the DS1WM */ | 168 | /* the first 5 PASIC3 registers control the DS1WM */ |
174 | ds1wm_resources[0].end = (5 << asic->bus_shift) - 1; | 169 | ds1wm_resources[0].end = (5 << asic->bus_shift) - 1; |
175 | ds1wm_cell.platform_data = &ds1wm_cell; | ||
176 | ds1wm_cell.data_size = sizeof(ds1wm_cell); | ||
177 | ret = mfd_add_devices(&pdev->dev, pdev->id, | 170 | ret = mfd_add_devices(&pdev->dev, pdev->id, |
178 | &ds1wm_cell, 1, r, irq); | 171 | &ds1wm_cell, 1, r, irq); |
179 | if (ret < 0) | 172 | if (ret < 0) |
@@ -181,9 +174,8 @@ static int __init pasic3_probe(struct platform_device *pdev) | |||
181 | } | 174 | } |
182 | 175 | ||
183 | if (pdata && pdata->led_pdata) { | 176 | if (pdata && pdata->led_pdata) { |
184 | led_cell.driver_data = pdata->led_pdata; | 177 | led_cell.platform_data = pdata->led_pdata; |
185 | led_cell.platform_data = &led_cell; | 178 | led_cell.pdata_size = sizeof(struct pasic3_leds_machinfo); |
186 | led_cell.data_size = sizeof(ds1wm_cell); | ||
187 | ret = mfd_add_devices(&pdev->dev, pdev->id, &led_cell, 1, r, 0); | 179 | ret = mfd_add_devices(&pdev->dev, pdev->id, &led_cell, 1, r, 0); |
188 | if (ret < 0) | 180 | if (ret < 0) |
189 | dev_warn(dev, "failed to register LED device\n"); | 181 | dev_warn(dev, "failed to register LED device\n"); |