diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-02-19 10:55:00 -0500 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-02-23 11:24:14 -0500 |
| commit | aa25afad2ca60d19457849ea75e9c31236f4e174 (patch) | |
| tree | 24c8c815caf191af56f8de287637087c298711b2 | |
| parent | 394d5aefcdecb51bbf7d6df757e73559c9692a08 (diff) | |
ARM: amba: make probe() functions take const id tables
Make Primecell driver probe functions take a const pointer to their
ID tables. Drivers should never modify their ID tables in their
probe handler.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| -rw-r--r-- | arch/arm/kernel/etm.c | 4 | ||||
| -rw-r--r-- | drivers/char/hw_random/nomadik-rng.c | 2 | ||||
| -rw-r--r-- | drivers/dma/amba-pl08x.c | 2 | ||||
| -rw-r--r-- | drivers/dma/pl330.c | 2 | ||||
| -rw-r--r-- | drivers/gpio/pl061.c | 2 | ||||
| -rw-r--r-- | drivers/input/serio/ambakmi.c | 3 | ||||
| -rw-r--r-- | drivers/mmc/host/mmci.c | 3 | ||||
| -rw-r--r-- | drivers/rtc/rtc-pl030.c | 2 | ||||
| -rw-r--r-- | drivers/rtc/rtc-pl031.c | 2 | ||||
| -rw-r--r-- | drivers/spi/amba-pl022.c | 2 | ||||
| -rw-r--r-- | drivers/tty/serial/amba-pl010.c | 2 | ||||
| -rw-r--r-- | drivers/tty/serial/amba-pl011.c | 2 | ||||
| -rw-r--r-- | drivers/video/amba-clcd.c | 2 | ||||
| -rw-r--r-- | drivers/watchdog/sp805_wdt.c | 2 | ||||
| -rw-r--r-- | include/linux/amba/bus.h | 2 | ||||
| -rw-r--r-- | sound/arm/aaci.c | 3 |
16 files changed, 20 insertions, 17 deletions
diff --git a/arch/arm/kernel/etm.c b/arch/arm/kernel/etm.c index 11db62806a1a..052b509e2d5f 100644 --- a/arch/arm/kernel/etm.c +++ b/arch/arm/kernel/etm.c | |||
| @@ -338,7 +338,7 @@ static struct miscdevice etb_miscdev = { | |||
| 338 | .fops = &etb_fops, | 338 | .fops = &etb_fops, |
| 339 | }; | 339 | }; |
| 340 | 340 | ||
| 341 | static int __init etb_probe(struct amba_device *dev, struct amba_id *id) | 341 | static int __init etb_probe(struct amba_device *dev, const struct amba_id *id) |
| 342 | { | 342 | { |
| 343 | struct tracectx *t = &tracer; | 343 | struct tracectx *t = &tracer; |
| 344 | int ret = 0; | 344 | int ret = 0; |
| @@ -530,7 +530,7 @@ static ssize_t trace_mode_store(struct kobject *kobj, | |||
| 530 | static struct kobj_attribute trace_mode_attr = | 530 | static struct kobj_attribute trace_mode_attr = |
| 531 | __ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store); | 531 | __ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store); |
| 532 | 532 | ||
| 533 | static int __init etm_probe(struct amba_device *dev, struct amba_id *id) | 533 | static int __init etm_probe(struct amba_device *dev, const struct amba_id *id) |
| 534 | { | 534 | { |
| 535 | struct tracectx *t = &tracer; | 535 | struct tracectx *t = &tracer; |
| 536 | int ret = 0; | 536 | int ret = 0; |
diff --git a/drivers/char/hw_random/nomadik-rng.c b/drivers/char/hw_random/nomadik-rng.c index a348c7e9aa0b..dd1d143eb8ea 100644 --- a/drivers/char/hw_random/nomadik-rng.c +++ b/drivers/char/hw_random/nomadik-rng.c | |||
| @@ -39,7 +39,7 @@ static struct hwrng nmk_rng = { | |||
| 39 | .read = nmk_rng_read, | 39 | .read = nmk_rng_read, |
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | static int nmk_rng_probe(struct amba_device *dev, struct amba_id *id) | 42 | static int nmk_rng_probe(struct amba_device *dev, const struct amba_id *id) |
| 43 | { | 43 | { |
| 44 | void __iomem *base; | 44 | void __iomem *base; |
| 45 | int ret; | 45 | int ret; |
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index 07bca4970e50..e6d7228b1479 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c | |||
| @@ -1845,7 +1845,7 @@ static inline void init_pl08x_debugfs(struct pl08x_driver_data *pl08x) | |||
| 1845 | } | 1845 | } |
| 1846 | #endif | 1846 | #endif |
| 1847 | 1847 | ||
| 1848 | static int pl08x_probe(struct amba_device *adev, struct amba_id *id) | 1848 | static int pl08x_probe(struct amba_device *adev, const struct amba_id *id) |
| 1849 | { | 1849 | { |
| 1850 | struct pl08x_driver_data *pl08x; | 1850 | struct pl08x_driver_data *pl08x; |
| 1851 | const struct vendor_data *vd = id->data; | 1851 | const struct vendor_data *vd = id->data; |
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 7c50f6dfd3f4..6abe1ec1f2ce 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
| @@ -657,7 +657,7 @@ static irqreturn_t pl330_irq_handler(int irq, void *data) | |||
| 657 | } | 657 | } |
| 658 | 658 | ||
| 659 | static int __devinit | 659 | static int __devinit |
| 660 | pl330_probe(struct amba_device *adev, struct amba_id *id) | 660 | pl330_probe(struct amba_device *adev, const struct amba_id *id) |
| 661 | { | 661 | { |
| 662 | struct dma_pl330_platdata *pdat; | 662 | struct dma_pl330_platdata *pdat; |
| 663 | struct dma_pl330_dmac *pdmac; | 663 | struct dma_pl330_dmac *pdmac; |
diff --git a/drivers/gpio/pl061.c b/drivers/gpio/pl061.c index 2975d22daffe..838ddbdf90cc 100644 --- a/drivers/gpio/pl061.c +++ b/drivers/gpio/pl061.c | |||
| @@ -232,7 +232,7 @@ static void pl061_irq_handler(unsigned irq, struct irq_desc *desc) | |||
| 232 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | 232 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | static int pl061_probe(struct amba_device *dev, struct amba_id *id) | 235 | static int pl061_probe(struct amba_device *dev, const struct amba_id *id) |
| 236 | { | 236 | { |
| 237 | struct pl061_platform_data *pdata; | 237 | struct pl061_platform_data *pdata; |
| 238 | struct pl061_gpio *chip; | 238 | struct pl061_gpio *chip; |
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c index 92563a681d65..12abc50508e5 100644 --- a/drivers/input/serio/ambakmi.c +++ b/drivers/input/serio/ambakmi.c | |||
| @@ -107,7 +107,8 @@ static void amba_kmi_close(struct serio *io) | |||
| 107 | clk_disable(kmi->clk); | 107 | clk_disable(kmi->clk); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | static int __devinit amba_kmi_probe(struct amba_device *dev, struct amba_id *id) | 110 | static int __devinit amba_kmi_probe(struct amba_device *dev, |
| 111 | const struct amba_id *id) | ||
| 111 | { | 112 | { |
| 112 | struct amba_kmi_port *kmi; | 113 | struct amba_kmi_port *kmi; |
| 113 | struct serio *io; | 114 | struct serio *io; |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 2d6de3e03e2d..67f17d61b978 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
| @@ -713,7 +713,8 @@ static const struct mmc_host_ops mmci_ops = { | |||
| 713 | .get_cd = mmci_get_cd, | 713 | .get_cd = mmci_get_cd, |
| 714 | }; | 714 | }; |
| 715 | 715 | ||
| 716 | static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id) | 716 | static int __devinit mmci_probe(struct amba_device *dev, |
| 717 | const struct amba_id *id) | ||
| 717 | { | 718 | { |
| 718 | struct mmci_platform_data *plat = dev->dev.platform_data; | 719 | struct mmci_platform_data *plat = dev->dev.platform_data; |
| 719 | struct variant_data *variant = id->data; | 720 | struct variant_data *variant = id->data; |
diff --git a/drivers/rtc/rtc-pl030.c b/drivers/rtc/rtc-pl030.c index bbdb2f02798a..baff724cd40f 100644 --- a/drivers/rtc/rtc-pl030.c +++ b/drivers/rtc/rtc-pl030.c | |||
| @@ -103,7 +103,7 @@ static const struct rtc_class_ops pl030_ops = { | |||
| 103 | .set_alarm = pl030_set_alarm, | 103 | .set_alarm = pl030_set_alarm, |
| 104 | }; | 104 | }; |
| 105 | 105 | ||
| 106 | static int pl030_probe(struct amba_device *dev, struct amba_id *id) | 106 | static int pl030_probe(struct amba_device *dev, const struct amba_id *id) |
| 107 | { | 107 | { |
| 108 | struct pl030_rtc *rtc; | 108 | struct pl030_rtc *rtc; |
| 109 | int ret; | 109 | int ret; |
diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c index b7a6690e5b35..6568f4b37e19 100644 --- a/drivers/rtc/rtc-pl031.c +++ b/drivers/rtc/rtc-pl031.c | |||
| @@ -358,7 +358,7 @@ static int pl031_remove(struct amba_device *adev) | |||
| 358 | return 0; | 358 | return 0; |
| 359 | } | 359 | } |
| 360 | 360 | ||
| 361 | static int pl031_probe(struct amba_device *adev, struct amba_id *id) | 361 | static int pl031_probe(struct amba_device *adev, const struct amba_id *id) |
| 362 | { | 362 | { |
| 363 | int ret; | 363 | int ret; |
| 364 | struct pl031_local *ldata; | 364 | struct pl031_local *ldata; |
diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c index 71a1219a995d..95e58c70a2c9 100644 --- a/drivers/spi/amba-pl022.c +++ b/drivers/spi/amba-pl022.c | |||
| @@ -2021,7 +2021,7 @@ static void pl022_cleanup(struct spi_device *spi) | |||
| 2021 | 2021 | ||
| 2022 | 2022 | ||
| 2023 | static int __devinit | 2023 | static int __devinit |
| 2024 | pl022_probe(struct amba_device *adev, struct amba_id *id) | 2024 | pl022_probe(struct amba_device *adev, const struct amba_id *id) |
| 2025 | { | 2025 | { |
| 2026 | struct device *dev = &adev->dev; | 2026 | struct device *dev = &adev->dev; |
| 2027 | struct pl022_ssp_controller *platform_info = adev->dev.platform_data; | 2027 | struct pl022_ssp_controller *platform_info = adev->dev.platform_data; |
diff --git a/drivers/tty/serial/amba-pl010.c b/drivers/tty/serial/amba-pl010.c index 2904aa044126..d742dd2c525c 100644 --- a/drivers/tty/serial/amba-pl010.c +++ b/drivers/tty/serial/amba-pl010.c | |||
| @@ -676,7 +676,7 @@ static struct uart_driver amba_reg = { | |||
| 676 | .cons = AMBA_CONSOLE, | 676 | .cons = AMBA_CONSOLE, |
| 677 | }; | 677 | }; |
| 678 | 678 | ||
| 679 | static int pl010_probe(struct amba_device *dev, struct amba_id *id) | 679 | static int pl010_probe(struct amba_device *dev, const struct amba_id *id) |
| 680 | { | 680 | { |
| 681 | struct uart_amba_port *uap; | 681 | struct uart_amba_port *uap; |
| 682 | void __iomem *base; | 682 | void __iomem *base; |
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index e76d7d000128..0dae46f91021 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c | |||
| @@ -1349,7 +1349,7 @@ static struct uart_driver amba_reg = { | |||
| 1349 | .cons = AMBA_CONSOLE, | 1349 | .cons = AMBA_CONSOLE, |
| 1350 | }; | 1350 | }; |
| 1351 | 1351 | ||
| 1352 | static int pl011_probe(struct amba_device *dev, struct amba_id *id) | 1352 | static int pl011_probe(struct amba_device *dev, const struct amba_id *id) |
| 1353 | { | 1353 | { |
| 1354 | struct uart_amba_port *uap; | 1354 | struct uart_amba_port *uap; |
| 1355 | struct vendor_data *vendor = id->data; | 1355 | struct vendor_data *vendor = id->data; |
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index 1c2c68356ea7..013c8ce57205 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c | |||
| @@ -461,7 +461,7 @@ static int clcdfb_register(struct clcd_fb *fb) | |||
| 461 | return ret; | 461 | return ret; |
| 462 | } | 462 | } |
| 463 | 463 | ||
| 464 | static int clcdfb_probe(struct amba_device *dev, struct amba_id *id) | 464 | static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id) |
| 465 | { | 465 | { |
| 466 | struct clcd_board *board = dev->dev.platform_data; | 466 | struct clcd_board *board = dev->dev.platform_data; |
| 467 | struct clcd_fb *fb; | 467 | struct clcd_fb *fb; |
diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c index 9127eda2145b..0a0efe713bc8 100644 --- a/drivers/watchdog/sp805_wdt.c +++ b/drivers/watchdog/sp805_wdt.c | |||
| @@ -278,7 +278,7 @@ static struct miscdevice sp805_wdt_miscdev = { | |||
| 278 | }; | 278 | }; |
| 279 | 279 | ||
| 280 | static int __devinit | 280 | static int __devinit |
| 281 | sp805_wdt_probe(struct amba_device *adev, struct amba_id *id) | 281 | sp805_wdt_probe(struct amba_device *adev, const struct amba_id *id) |
| 282 | { | 282 | { |
| 283 | int ret = 0; | 283 | int ret = 0; |
| 284 | 284 | ||
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index a0ccf28e9741..07b6374652dc 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
| @@ -43,7 +43,7 @@ struct amba_id { | |||
| 43 | 43 | ||
| 44 | struct amba_driver { | 44 | struct amba_driver { |
| 45 | struct device_driver drv; | 45 | struct device_driver drv; |
| 46 | int (*probe)(struct amba_device *, struct amba_id *); | 46 | int (*probe)(struct amba_device *, const struct amba_id *); |
| 47 | int (*remove)(struct amba_device *); | 47 | int (*remove)(struct amba_device *); |
| 48 | void (*shutdown)(struct amba_device *); | 48 | void (*shutdown)(struct amba_device *); |
| 49 | int (*suspend)(struct amba_device *, pm_message_t); | 49 | int (*suspend)(struct amba_device *, pm_message_t); |
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 7c1fc64cb53d..d0821f8974a4 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
| @@ -1011,7 +1011,8 @@ static unsigned int __devinit aaci_size_fifo(struct aaci *aaci) | |||
| 1011 | return i; | 1011 | return i; |
| 1012 | } | 1012 | } |
| 1013 | 1013 | ||
| 1014 | static int __devinit aaci_probe(struct amba_device *dev, struct amba_id *id) | 1014 | static int __devinit aaci_probe(struct amba_device *dev, |
| 1015 | const struct amba_id *id) | ||
| 1015 | { | 1016 | { |
| 1016 | struct aaci *aaci; | 1017 | struct aaci *aaci; |
| 1017 | int ret, i; | 1018 | int ret, i; |
