summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2015-07-22 03:55:43 -0400
committerLee Jones <lee.jones@linaro.org>2015-08-11 10:09:00 -0400
commit035faf4bd2776237940c95d08bfe8928fe0a80e1 (patch)
tree3eadc1f4402002043147ce3d56dd97dc101dd704
parent31115336d95d7d9ebb4b1bb8449876f798b0b2f7 (diff)
mfd: ipaq-micro: Convert to built-in platform driver
Signal that this is a built-in driver and call its probe function immediately on init. Suppress binding attributes and delete the .remove() function since it is never unloaded. Tag probe() and functions only called from probe() with __init. Delete all module macros since this is a pure built-in. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/mfd/ipaq-micro.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c
index 9bfe2462c5c5..a41859c55bda 100644
--- a/drivers/mfd/ipaq-micro.c
+++ b/drivers/mfd/ipaq-micro.c
@@ -242,7 +242,7 @@ static u16 ipaq_micro_to_u16(u8 *data)
242 return data[1] << 8 | data[0]; 242 return data[1] << 8 | data[0];
243} 243}
244 244
245static void ipaq_micro_eeprom_dump(struct ipaq_micro *micro) 245static void __init ipaq_micro_eeprom_dump(struct ipaq_micro *micro)
246{ 246{
247 u8 dump[256]; 247 u8 dump[256];
248 char *str; 248 char *str;
@@ -386,7 +386,7 @@ static int micro_resume(struct device *dev)
386 return 0; 386 return 0;
387} 387}
388 388
389static int micro_probe(struct platform_device *pdev) 389static int __init micro_probe(struct platform_device *pdev)
390{ 390{
391 struct ipaq_micro *micro; 391 struct ipaq_micro *micro;
392 struct resource *res; 392 struct resource *res;
@@ -448,21 +448,6 @@ static int micro_probe(struct platform_device *pdev)
448 return 0; 448 return 0;
449} 449}
450 450
451static int micro_remove(struct platform_device *pdev)
452{
453 struct ipaq_micro *micro = platform_get_drvdata(pdev);
454 u32 val;
455
456 mfd_remove_devices(&pdev->dev);
457
458 val = readl(micro->base + UTCR3);
459 val &= ~(UTCR3_RXE | UTCR3_RIE); /* disable receive interrupt */
460 val &= ~(UTCR3_TXE | UTCR3_TIE); /* disable transmit interrupt */
461 writel(val, micro->base + UTCR3);
462
463 return 0;
464}
465
466static const struct dev_pm_ops micro_dev_pm_ops = { 451static const struct dev_pm_ops micro_dev_pm_ops = {
467 SET_SYSTEM_SLEEP_PM_OPS(NULL, micro_resume) 452 SET_SYSTEM_SLEEP_PM_OPS(NULL, micro_resume)
468}; 453};
@@ -471,11 +456,7 @@ static struct platform_driver micro_device_driver = {
471 .driver = { 456 .driver = {
472 .name = "ipaq-h3xxx-micro", 457 .name = "ipaq-h3xxx-micro",
473 .pm = &micro_dev_pm_ops, 458 .pm = &micro_dev_pm_ops,
459 .suppress_bind_attrs = true,
474 }, 460 },
475 .probe = micro_probe,
476 .remove = micro_remove,
477}; 461};
478module_platform_driver(micro_device_driver); 462builtin_platform_driver_probe(micro_device_driver, micro_probe);
479
480MODULE_LICENSE("GPL");
481MODULE_DESCRIPTION("driver for iPAQ Atmel micro core and backlight");