From 2f8c51493323550529ed295ba6ddcdd3d0f704d5 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Wed, 9 Apr 2008 22:43:37 +0100 Subject: [ARM] 4956/1: Scoop: sparse cleanup Cleanup most errors errors reported by sparse: declare IO space as __iomem, use %p for address printing make functions static Use __devinit instead of __init for scoop_init Make scoop_remove __devexit and use __devexit_p for referencing it. Signed-off-by: Dmitry Baryshkov Acked-by: Richard Purdie Signed-off-by: Russell King --- arch/arm/common/scoop.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index 314ebd3a1d71..04b4a92d7b6f 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c @@ -30,10 +30,10 @@ struct scoop_pcmcia_config *platform_scoop_config; EXPORT_SYMBOL(platform_scoop_config); -#define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr))) +#define SCOOP_REG(d,adr) (*(volatile __iomem unsigned short*)(d +(adr))) struct scoop_dev { - void *base; + void __iomem *base; spinlock_t scoop_lock; unsigned short suspend_clr; unsigned short suspend_set; @@ -135,7 +135,7 @@ static int scoop_resume(struct platform_device *dev) #define scoop_resume NULL #endif -int __init scoop_probe(struct platform_device *pdev) +static int __devinit scoop_probe(struct platform_device *pdev) { struct scoop_dev *devptr; struct scoop_config *inf; @@ -160,7 +160,7 @@ int __init scoop_probe(struct platform_device *pdev) platform_set_drvdata(pdev, devptr); - printk("Sharp Scoop Device found at 0x%08x -> 0x%08x\n",(unsigned int)mem->start,(unsigned int)devptr->base); + printk("Sharp Scoop Device found at 0x%08x -> 0x%8p\n",(unsigned int)mem->start, devptr->base); SCOOP_REG(devptr->base, SCOOP_MCR) = 0x0140; reset_scoop(&pdev->dev); @@ -174,7 +174,7 @@ int __init scoop_probe(struct platform_device *pdev) return 0; } -static int scoop_remove(struct platform_device *pdev) +static int __devexit scoop_remove(struct platform_device *pdev) { struct scoop_dev *sdev = platform_get_drvdata(pdev); if (sdev) { @@ -187,7 +187,7 @@ static int scoop_remove(struct platform_device *pdev) static struct platform_driver scoop_driver = { .probe = scoop_probe, - .remove = scoop_remove, + .remove = __devexit_p(scoop_remove), .suspend = scoop_suspend, .resume = scoop_resume, .driver = { @@ -195,7 +195,7 @@ static struct platform_driver scoop_driver = { }, }; -int __init scoop_init(void) +static int __init scoop_init(void) { return platform_driver_register(&scoop_driver); } -- cgit v1.2.2