Commit aa25afad authored by Russell King's avatar Russell King

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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 394d5aef
...@@ -338,7 +338,7 @@ static struct miscdevice etb_miscdev = { ...@@ -338,7 +338,7 @@ static struct miscdevice etb_miscdev = {
.fops = &etb_fops, .fops = &etb_fops,
}; };
static int __init etb_probe(struct amba_device *dev, struct amba_id *id) static int __init etb_probe(struct amba_device *dev, const struct amba_id *id)
{ {
struct tracectx *t = &tracer; struct tracectx *t = &tracer;
int ret = 0; int ret = 0;
...@@ -530,7 +530,7 @@ static ssize_t trace_mode_store(struct kobject *kobj, ...@@ -530,7 +530,7 @@ static ssize_t trace_mode_store(struct kobject *kobj,
static struct kobj_attribute trace_mode_attr = static struct kobj_attribute trace_mode_attr =
__ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store); __ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store);
static int __init etm_probe(struct amba_device *dev, struct amba_id *id) static int __init etm_probe(struct amba_device *dev, const struct amba_id *id)
{ {
struct tracectx *t = &tracer; struct tracectx *t = &tracer;
int ret = 0; int ret = 0;
......
...@@ -39,7 +39,7 @@ static struct hwrng nmk_rng = { ...@@ -39,7 +39,7 @@ static struct hwrng nmk_rng = {
.read = nmk_rng_read, .read = nmk_rng_read,
}; };
static int nmk_rng_probe(struct amba_device *dev, struct amba_id *id) static int nmk_rng_probe(struct amba_device *dev, const struct amba_id *id)
{ {
void __iomem *base; void __iomem *base;
int ret; int ret;
......
...@@ -1845,7 +1845,7 @@ static inline void init_pl08x_debugfs(struct pl08x_driver_data *pl08x) ...@@ -1845,7 +1845,7 @@ static inline void init_pl08x_debugfs(struct pl08x_driver_data *pl08x)
} }
#endif #endif
static int pl08x_probe(struct amba_device *adev, struct amba_id *id) static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
{ {
struct pl08x_driver_data *pl08x; struct pl08x_driver_data *pl08x;
const struct vendor_data *vd = id->data; const struct vendor_data *vd = id->data;
......
...@@ -657,7 +657,7 @@ static irqreturn_t pl330_irq_handler(int irq, void *data) ...@@ -657,7 +657,7 @@ static irqreturn_t pl330_irq_handler(int irq, void *data)
} }
static int __devinit static int __devinit
pl330_probe(struct amba_device *adev, struct amba_id *id) pl330_probe(struct amba_device *adev, const struct amba_id *id)
{ {
struct dma_pl330_platdata *pdat; struct dma_pl330_platdata *pdat;
struct dma_pl330_dmac *pdmac; struct dma_pl330_dmac *pdmac;
......
...@@ -232,7 +232,7 @@ static void pl061_irq_handler(unsigned irq, struct irq_desc *desc) ...@@ -232,7 +232,7 @@ static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
desc->irq_data.chip->irq_unmask(&desc->irq_data); desc->irq_data.chip->irq_unmask(&desc->irq_data);
} }
static int pl061_probe(struct amba_device *dev, struct amba_id *id) static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
{ {
struct pl061_platform_data *pdata; struct pl061_platform_data *pdata;
struct pl061_gpio *chip; struct pl061_gpio *chip;
......
...@@ -107,7 +107,8 @@ static void amba_kmi_close(struct serio *io) ...@@ -107,7 +107,8 @@ static void amba_kmi_close(struct serio *io)
clk_disable(kmi->clk); clk_disable(kmi->clk);
} }
static int __devinit amba_kmi_probe(struct amba_device *dev, struct amba_id *id) static int __devinit amba_kmi_probe(struct amba_device *dev,
const struct amba_id *id)
{ {
struct amba_kmi_port *kmi; struct amba_kmi_port *kmi;
struct serio *io; struct serio *io;
......
...@@ -713,7 +713,8 @@ static const struct mmc_host_ops mmci_ops = { ...@@ -713,7 +713,8 @@ static const struct mmc_host_ops mmci_ops = {
.get_cd = mmci_get_cd, .get_cd = mmci_get_cd,
}; };
static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id) static int __devinit mmci_probe(struct amba_device *dev,
const struct amba_id *id)
{ {
struct mmci_platform_data *plat = dev->dev.platform_data; struct mmci_platform_data *plat = dev->dev.platform_data;
struct variant_data *variant = id->data; struct variant_data *variant = id->data;
......
...@@ -103,7 +103,7 @@ static const struct rtc_class_ops pl030_ops = { ...@@ -103,7 +103,7 @@ static const struct rtc_class_ops pl030_ops = {
.set_alarm = pl030_set_alarm, .set_alarm = pl030_set_alarm,
}; };
static int pl030_probe(struct amba_device *dev, struct amba_id *id) static int pl030_probe(struct amba_device *dev, const struct amba_id *id)
{ {
struct pl030_rtc *rtc; struct pl030_rtc *rtc;
int ret; int ret;
......
...@@ -358,7 +358,7 @@ static int pl031_remove(struct amba_device *adev) ...@@ -358,7 +358,7 @@ static int pl031_remove(struct amba_device *adev)
return 0; return 0;
} }
static int pl031_probe(struct amba_device *adev, struct amba_id *id) static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
{ {
int ret; int ret;
struct pl031_local *ldata; struct pl031_local *ldata;
......
...@@ -2021,7 +2021,7 @@ static void pl022_cleanup(struct spi_device *spi) ...@@ -2021,7 +2021,7 @@ static void pl022_cleanup(struct spi_device *spi)
static int __devinit static int __devinit
pl022_probe(struct amba_device *adev, struct amba_id *id) pl022_probe(struct amba_device *adev, const struct amba_id *id)
{ {
struct device *dev = &adev->dev; struct device *dev = &adev->dev;
struct pl022_ssp_controller *platform_info = adev->dev.platform_data; struct pl022_ssp_controller *platform_info = adev->dev.platform_data;
......
...@@ -676,7 +676,7 @@ static struct uart_driver amba_reg = { ...@@ -676,7 +676,7 @@ static struct uart_driver amba_reg = {
.cons = AMBA_CONSOLE, .cons = AMBA_CONSOLE,
}; };
static int pl010_probe(struct amba_device *dev, struct amba_id *id) static int pl010_probe(struct amba_device *dev, const struct amba_id *id)
{ {
struct uart_amba_port *uap; struct uart_amba_port *uap;
void __iomem *base; void __iomem *base;
......
...@@ -1349,7 +1349,7 @@ static struct uart_driver amba_reg = { ...@@ -1349,7 +1349,7 @@ static struct uart_driver amba_reg = {
.cons = AMBA_CONSOLE, .cons = AMBA_CONSOLE,
}; };
static int pl011_probe(struct amba_device *dev, struct amba_id *id) static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
{ {
struct uart_amba_port *uap; struct uart_amba_port *uap;
struct vendor_data *vendor = id->data; struct vendor_data *vendor = id->data;
......
...@@ -461,7 +461,7 @@ static int clcdfb_register(struct clcd_fb *fb) ...@@ -461,7 +461,7 @@ static int clcdfb_register(struct clcd_fb *fb)
return ret; return ret;
} }
static int clcdfb_probe(struct amba_device *dev, struct amba_id *id) static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id)
{ {
struct clcd_board *board = dev->dev.platform_data; struct clcd_board *board = dev->dev.platform_data;
struct clcd_fb *fb; struct clcd_fb *fb;
......
...@@ -278,7 +278,7 @@ static struct miscdevice sp805_wdt_miscdev = { ...@@ -278,7 +278,7 @@ static struct miscdevice sp805_wdt_miscdev = {
}; };
static int __devinit static int __devinit
sp805_wdt_probe(struct amba_device *adev, struct amba_id *id) sp805_wdt_probe(struct amba_device *adev, const struct amba_id *id)
{ {
int ret = 0; int ret = 0;
......
...@@ -43,7 +43,7 @@ struct amba_id { ...@@ -43,7 +43,7 @@ struct amba_id {
struct amba_driver { struct amba_driver {
struct device_driver drv; struct device_driver drv;
int (*probe)(struct amba_device *, struct amba_id *); int (*probe)(struct amba_device *, const struct amba_id *);
int (*remove)(struct amba_device *); int (*remove)(struct amba_device *);
void (*shutdown)(struct amba_device *); void (*shutdown)(struct amba_device *);
int (*suspend)(struct amba_device *, pm_message_t); int (*suspend)(struct amba_device *, pm_message_t);
......
...@@ -1011,7 +1011,8 @@ static unsigned int __devinit aaci_size_fifo(struct aaci *aaci) ...@@ -1011,7 +1011,8 @@ static unsigned int __devinit aaci_size_fifo(struct aaci *aaci)
return i; return i;
} }
static int __devinit aaci_probe(struct amba_device *dev, struct amba_id *id) static int __devinit aaci_probe(struct amba_device *dev,
const struct amba_id *id)
{ {
struct aaci *aaci; struct aaci *aaci;
int ret, i; int ret, i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment