Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+20 -17
+2 -2
arch/arm/kernel/etm.c
··· 338 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 343 struct tracectx *t = &tracer; 344 344 int ret = 0; ··· 530 530 static struct kobj_attribute trace_mode_attr = 531 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 535 struct tracectx *t = &tracer; 536 536 int ret = 0;
+1 -1
drivers/char/hw_random/nomadik-rng.c
··· 39 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 44 void __iomem *base; 45 45 int ret;
+1 -1
drivers/dma/amba-pl08x.c
··· 1845 1845 } 1846 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 1850 struct pl08x_driver_data *pl08x; 1851 1851 const struct vendor_data *vd = id->data;
+1 -1
drivers/dma/pl330.c
··· 657 657 } 658 658 659 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 662 struct dma_pl330_platdata *pdat; 663 663 struct dma_pl330_dmac *pdmac;
+1 -1
drivers/gpio/pl061.c
··· 232 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 237 struct pl061_platform_data *pdata; 238 238 struct pl061_gpio *chip;
+2 -1
drivers/input/serio/ambakmi.c
··· 107 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 113 struct amba_kmi_port *kmi; 113 114 struct serio *io;
+2 -1
drivers/mmc/host/mmci.c
··· 713 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 719 struct mmci_platform_data *plat = dev->dev.platform_data; 719 720 struct variant_data *variant = id->data;
+1 -1
drivers/rtc/rtc-pl030.c
··· 103 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 108 struct pl030_rtc *rtc; 109 109 int ret;
+1 -1
drivers/rtc/rtc-pl031.c
··· 358 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 363 int ret; 364 364 struct pl031_local *ldata;
+1 -1
drivers/spi/amba-pl022.c
··· 2021 2021 2022 2022 2023 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 2026 struct device *dev = &adev->dev; 2027 2027 struct pl022_ssp_controller *platform_info = adev->dev.platform_data;
+1 -1
drivers/tty/serial/amba-pl010.c
··· 676 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 681 struct uart_amba_port *uap; 682 682 void __iomem *base;
+1 -1
drivers/tty/serial/amba-pl011.c
··· 1349 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 1354 struct uart_amba_port *uap; 1355 1355 struct vendor_data *vendor = id->data;
+1 -1
drivers/video/amba-clcd.c
··· 461 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 466 struct clcd_board *board = dev->dev.platform_data; 467 467 struct clcd_fb *fb;
+1 -1
drivers/watchdog/sp805_wdt.c
··· 278 278 }; 279 279 280 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 283 int ret = 0; 284 284
+1 -1
include/linux/amba/bus.h
··· 43 43 44 44 struct amba_driver { 45 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 47 int (*remove)(struct amba_device *); 48 48 void (*shutdown)(struct amba_device *); 49 49 int (*suspend)(struct amba_device *, pm_message_t);
+2 -1
sound/arm/aaci.c
··· 1011 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 1017 struct aaci *aaci; 1017 1018 int ret, i;