aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common/scoop.c
diff options
context:
space:
mode:
authorDmitry Baryshkov <dbaryshkov@gmail.com>2008-04-09 17:43:37 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-10 10:31:34 -0400
commit2f8c51493323550529ed295ba6ddcdd3d0f704d5 (patch)
treef440f72aa5d3aebdbfd86e74837cff01a694af28 /arch/arm/common/scoop.c
parent05dda977f2574c3341abef9b74c27d2b362e1e3a (diff)
[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 <dbaryshkov@gmail.com> Acked-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common/scoop.c')
-rw-r--r--arch/arm/common/scoop.c14
1 files changed, 7 insertions, 7 deletions
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 @@
30struct scoop_pcmcia_config *platform_scoop_config; 30struct scoop_pcmcia_config *platform_scoop_config;
31EXPORT_SYMBOL(platform_scoop_config); 31EXPORT_SYMBOL(platform_scoop_config);
32 32
33#define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr))) 33#define SCOOP_REG(d,adr) (*(volatile __iomem unsigned short*)(d +(adr)))
34 34
35struct scoop_dev { 35struct scoop_dev {
36 void *base; 36 void __iomem *base;
37 spinlock_t scoop_lock; 37 spinlock_t scoop_lock;
38 unsigned short suspend_clr; 38 unsigned short suspend_clr;
39 unsigned short suspend_set; 39 unsigned short suspend_set;
@@ -135,7 +135,7 @@ static int scoop_resume(struct platform_device *dev)
135#define scoop_resume NULL 135#define scoop_resume NULL
136#endif 136#endif
137 137
138int __init scoop_probe(struct platform_device *pdev) 138static int __devinit scoop_probe(struct platform_device *pdev)
139{ 139{
140 struct scoop_dev *devptr; 140 struct scoop_dev *devptr;
141 struct scoop_config *inf; 141 struct scoop_config *inf;
@@ -160,7 +160,7 @@ int __init scoop_probe(struct platform_device *pdev)
160 160
161 platform_set_drvdata(pdev, devptr); 161 platform_set_drvdata(pdev, devptr);
162 162
163 printk("Sharp Scoop Device found at 0x%08x -> 0x%08x\n",(unsigned int)mem->start,(unsigned int)devptr->base); 163 printk("Sharp Scoop Device found at 0x%08x -> 0x%8p\n",(unsigned int)mem->start, devptr->base);
164 164
165 SCOOP_REG(devptr->base, SCOOP_MCR) = 0x0140; 165 SCOOP_REG(devptr->base, SCOOP_MCR) = 0x0140;
166 reset_scoop(&pdev->dev); 166 reset_scoop(&pdev->dev);
@@ -174,7 +174,7 @@ int __init scoop_probe(struct platform_device *pdev)
174 return 0; 174 return 0;
175} 175}
176 176
177static int scoop_remove(struct platform_device *pdev) 177static int __devexit scoop_remove(struct platform_device *pdev)
178{ 178{
179 struct scoop_dev *sdev = platform_get_drvdata(pdev); 179 struct scoop_dev *sdev = platform_get_drvdata(pdev);
180 if (sdev) { 180 if (sdev) {
@@ -187,7 +187,7 @@ static int scoop_remove(struct platform_device *pdev)
187 187
188static struct platform_driver scoop_driver = { 188static struct platform_driver scoop_driver = {
189 .probe = scoop_probe, 189 .probe = scoop_probe,
190 .remove = scoop_remove, 190 .remove = __devexit_p(scoop_remove),
191 .suspend = scoop_suspend, 191 .suspend = scoop_suspend,
192 .resume = scoop_resume, 192 .resume = scoop_resume,
193 .driver = { 193 .driver = {
@@ -195,7 +195,7 @@ static struct platform_driver scoop_driver = {
195 }, 195 },
196}; 196};
197 197
198int __init scoop_init(void) 198static int __init scoop_init(void)
199{ 199{
200 return platform_driver_register(&scoop_driver); 200 return platform_driver_register(&scoop_driver);
201} 201}