aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/mcp-sa11x0.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c
index 7daa0ed7331c..1eab7cffceaa 100644
--- a/drivers/mfd/mcp-sa11x0.c
+++ b/drivers/mfd/mcp-sa11x0.c
@@ -138,9 +138,8 @@ static struct mcp_ops mcp_sa11x0 = {
138 .disable = mcp_sa11x0_disable, 138 .disable = mcp_sa11x0_disable,
139}; 139};
140 140
141static int mcp_sa11x0_probe(struct device *dev) 141static int mcp_sa11x0_probe(struct platform_device *pdev)
142{ 142{
143 struct platform_device *pdev = to_platform_device(dev);
144 struct mcp_plat_data *data = pdev->dev.platform_data; 143 struct mcp_plat_data *data = pdev->dev.platform_data;
145 struct mcp *mcp; 144 struct mcp *mcp;
146 int ret; 145 int ret;
@@ -165,7 +164,7 @@ static int mcp_sa11x0_probe(struct device *dev)
165 mcp->dma_telco_rd = DMA_Ser4MCP1Rd; 164 mcp->dma_telco_rd = DMA_Ser4MCP1Rd;
166 mcp->dma_telco_wr = DMA_Ser4MCP1Wr; 165 mcp->dma_telco_wr = DMA_Ser4MCP1Wr;
167 166
168 dev_set_drvdata(dev, mcp); 167 platform_set_drvdata(pdev, mcp);
169 168
170 if (machine_is_assabet()) { 169 if (machine_is_assabet()) {
171 ASSABET_BCR_set(ASSABET_BCR_CODEC_RST); 170 ASSABET_BCR_set(ASSABET_BCR_CODEC_RST);
@@ -202,26 +201,26 @@ static int mcp_sa11x0_probe(struct device *dev)
202 201
203 release: 202 release:
204 release_mem_region(0x80060000, 0x60); 203 release_mem_region(0x80060000, 0x60);
205 dev_set_drvdata(dev, NULL); 204 platform_set_drvdata(pdev, NULL);
206 205
207 out: 206 out:
208 return ret; 207 return ret;
209} 208}
210 209
211static int mcp_sa11x0_remove(struct device *dev) 210static int mcp_sa11x0_remove(struct platform_device *dev)
212{ 211{
213 struct mcp *mcp = dev_get_drvdata(dev); 212 struct mcp *mcp = platform_get_drvdata(dev);
214 213
215 dev_set_drvdata(dev, NULL); 214 platform_set_drvdata(dev, NULL);
216 mcp_host_unregister(mcp); 215 mcp_host_unregister(mcp);
217 release_mem_region(0x80060000, 0x60); 216 release_mem_region(0x80060000, 0x60);
218 217
219 return 0; 218 return 0;
220} 219}
221 220
222static int mcp_sa11x0_suspend(struct device *dev, pm_message_t state) 221static int mcp_sa11x0_suspend(struct platform_device *dev, pm_message_t state)
223{ 222{
224 struct mcp *mcp = dev_get_drvdata(dev); 223 struct mcp *mcp = platform_get_drvdata(dev);
225 224
226 priv(mcp)->mccr0 = Ser4MCCR0; 225 priv(mcp)->mccr0 = Ser4MCCR0;
227 priv(mcp)->mccr1 = Ser4MCCR1; 226 priv(mcp)->mccr1 = Ser4MCCR1;
@@ -230,9 +229,9 @@ static int mcp_sa11x0_suspend(struct device *dev, pm_message_t state)
230 return 0; 229 return 0;
231} 230}
232 231
233static int mcp_sa11x0_resume(struct device *dev) 232static int mcp_sa11x0_resume(struct platform_device *dev)
234{ 233{
235 struct mcp *mcp = dev_get_drvdata(dev); 234 struct mcp *mcp = platform_get_drvdata(dev);
236 235
237 Ser4MCCR1 = priv(mcp)->mccr1; 236 Ser4MCCR1 = priv(mcp)->mccr1;
238 Ser4MCCR0 = priv(mcp)->mccr0; 237 Ser4MCCR0 = priv(mcp)->mccr0;
@@ -243,13 +242,14 @@ static int mcp_sa11x0_resume(struct device *dev)
243/* 242/*
244 * The driver for the SA11x0 MCP port. 243 * The driver for the SA11x0 MCP port.
245 */ 244 */
246static struct device_driver mcp_sa11x0_driver = { 245static struct platform_driver mcp_sa11x0_driver = {
247 .name = "sa11x0-mcp",
248 .bus = &platform_bus_type,
249 .probe = mcp_sa11x0_probe, 246 .probe = mcp_sa11x0_probe,
250 .remove = mcp_sa11x0_remove, 247 .remove = mcp_sa11x0_remove,
251 .suspend = mcp_sa11x0_suspend, 248 .suspend = mcp_sa11x0_suspend,
252 .resume = mcp_sa11x0_resume, 249 .resume = mcp_sa11x0_resume,
250 .driver = {
251 .name = "sa11x0-mcp",
252 },
253}; 253};
254 254
255/* 255/*
@@ -257,12 +257,12 @@ static struct device_driver mcp_sa11x0_driver = {
257 */ 257 */
258static int __init mcp_sa11x0_init(void) 258static int __init mcp_sa11x0_init(void)
259{ 259{
260 return driver_register(&mcp_sa11x0_driver); 260 return platform_driver_register(&mcp_sa11x0_driver);
261} 261}
262 262
263static void __exit mcp_sa11x0_exit(void) 263static void __exit mcp_sa11x0_exit(void)
264{ 264{
265 driver_unregister(&mcp_sa11x0_driver); 265 platform_driver_unregister(&mcp_sa11x0_driver);
266} 266}
267 267
268module_init(mcp_sa11x0_init); 268module_init(mcp_sa11x0_init);