Skip to content

Commit aa25afa

Browse files
author
Russell King
committed
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>
1 parent 394d5ae commit aa25afa

16 files changed

Lines changed: 20 additions & 17 deletions

File tree

arch/arm/kernel/etm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ static struct miscdevice etb_miscdev = {
338338
.fops = &etb_fops,
339339
};
340340

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)
342342
{
343343
struct tracectx *t = &tracer;
344344
int ret = 0;
@@ -530,7 +530,7 @@ static ssize_t trace_mode_store(struct kobject *kobj,
530530
static struct kobj_attribute trace_mode_attr =
531531
__ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store);
532532

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)
534534
{
535535
struct tracectx *t = &tracer;
536536
int ret = 0;

drivers/char/hw_random/nomadik-rng.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static struct hwrng nmk_rng = {
3939
.read = nmk_rng_read,
4040
};
4141

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)
4343
{
4444
void __iomem *base;
4545
int ret;

drivers/dma/amba-pl08x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1845,7 +1845,7 @@ static inline void init_pl08x_debugfs(struct pl08x_driver_data *pl08x)
18451845
}
18461846
#endif
18471847

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)
18491849
{
18501850
struct pl08x_driver_data *pl08x;
18511851
const struct vendor_data *vd = id->data;

drivers/dma/pl330.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ static irqreturn_t pl330_irq_handler(int irq, void *data)
657657
}
658658

659659
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)
661661
{
662662
struct dma_pl330_platdata *pdat;
663663
struct dma_pl330_dmac *pdmac;

drivers/gpio/pl061.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
232232
desc->irq_data.chip->irq_unmask(&desc->irq_data);
233233
}
234234

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)
236236
{
237237
struct pl061_platform_data *pdata;
238238
struct pl061_gpio *chip;

drivers/input/serio/ambakmi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ static void amba_kmi_close(struct serio *io)
107107
clk_disable(kmi->clk);
108108
}
109109

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)
111112
{
112113
struct amba_kmi_port *kmi;
113114
struct serio *io;

drivers/mmc/host/mmci.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,8 @@ static const struct mmc_host_ops mmci_ops = {
713713
.get_cd = mmci_get_cd,
714714
};
715715

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)
717718
{
718719
struct mmci_platform_data *plat = dev->dev.platform_data;
719720
struct variant_data *variant = id->data;

drivers/rtc/rtc-pl030.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static const struct rtc_class_ops pl030_ops = {
103103
.set_alarm = pl030_set_alarm,
104104
};
105105

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)
107107
{
108108
struct pl030_rtc *rtc;
109109
int ret;

drivers/rtc/rtc-pl031.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ static int pl031_remove(struct amba_device *adev)
358358
return 0;
359359
}
360360

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)
362362
{
363363
int ret;
364364
struct pl031_local *ldata;

drivers/spi/amba-pl022.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2021,7 +2021,7 @@ static void pl022_cleanup(struct spi_device *spi)
20212021

20222022

20232023
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)
20252025
{
20262026
struct device *dev = &adev->dev;
20272027
struct pl022_ssp_controller *platform_info = adev->dev.platform_data;

0 commit comments

Comments
 (0)