diff options
author | Olof Johansson <olof@lixom.net> | 2012-07-24 10:58:51 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-09-13 03:15:00 -0400 |
commit | 1a876762064b8e1ff9a65e78a7cba09eb765a54b (patch) | |
tree | d16beda7ff86273ca0668e1c9f411a165c1a3de3 /arch/powerpc | |
parent | 55d512e245bc7699a8800e23df1a24195dd08217 (diff) | |
parent | 75f21631bce693f867e7f2204875cb06cee9deff (diff) |
Merge branch 'ofdeviceiddata' of git://git.pengutronix.de/git/ukl/linux into next/fixes-non-critical
From "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>:
this is the 2nd version of this series whose goal is to make struct
of_device_id.data const. Conceptually a driver must not modify the data
contained there so making it const is the right thing.
v1 of this series was sent with Message-id:
1342182734-321-1-git-send-email-y. Changes since then are:
- powerpc fixes
- several new consts that were found by Arnd that are possible after
patch 19.
Arnd suggested to take this series via arm-soc late for 3.6 in one go
because patch 19 depends on the former patches but is a precondition to
the latter and it fixes a few warnings. So getting it in via the
respective maintainer trees would need a much bigger coordination
effort. That means I prefer getting Acks over you taking the patch.
Vinod Koul already took
dmaengine: at_hdmac: add a few const qualifiers
that is in next-20120723 as 7fd63ccdad72 now. Vinod, I don't follow your
pull requests, but assuming you didn't let it already pull for 3.6 I
suggest you drop it from your queue and I just take your Ack.
This series was build tested for arm (all defconfigs) and powerpc (all
defconfigs and an allyesconfig) and grep didn't find more issues. As
before it introduces a warning in drivers/regulator/twl-regulator.c.
This driver does modify its .of_match_table when a device is bound which
doesn't fits the concept of independant devices. Arnd noticed another
new warning in drivers/scsi/qlogicpti.c that isn't that easy to resolve,
because the pointer to (now) const data is passed as first argument to
scsi_host_alloc. To fix that properly struct Scsi_Host.hostt needs to
get a const, too. Alternatively I could introduce a cast removing the
const, but I don't like that.
* 'ofdeviceiddata' of git://git.pengutronix.de/git/ukl/linux: (25 commits)
dma: tegra: make data used as *of_device_id.data const
can: mpc5xxx_can: make data used as *of_device_id.data const
macintosh/mediabay: make data used as *of_device_id.data const
i2c/mpc: make data used as *of_device_id.data const
mfd/da9052: make i2c_device_id array const
powerpc/fsl_msi: drop unneeded cast to non-const pointer
gpio/gpio-omap: make platformdata used as *of_device_id.data const
of: add const to struct *of_device_id.data
dma: tegra: make tegra_dma.chip_data a pointer to const data
watchdog/mpc8xxx: add a const qualifier
powerpc/celleb_pci: add a const qualifier
powerpc/fsl_msi: add a const qualifier
powerpc/83xx: add a const qualifier
macintosh/mediabay: add a const qualifier
mmc/omap_hsmmc: add a const qualifier
i2c/mpc: add a const qualifier
i2c/i2c-omap: add a const qualifier
gpio/mpc8xxx: add a const qualifier
gpio/gpio-omap.c: add a const qualifier
misc/atmel_tc: make atmel_tc.tcb_config member point to const data
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[olof: repulled a v3 version of the branch that rebased to add some more
acked-bys and added one more patch on top for tegra]
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/83xx/suspend.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/celleb_pci.c | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_msi.c | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c index 1a046715e461..1d769a29249f 100644 --- a/arch/powerpc/platforms/83xx/suspend.c +++ b/arch/powerpc/platforms/83xx/suspend.c | |||
@@ -326,7 +326,7 @@ static int pmc_probe(struct platform_device *ofdev) | |||
326 | const struct of_device_id *match; | 326 | const struct of_device_id *match; |
327 | struct device_node *np = ofdev->dev.of_node; | 327 | struct device_node *np = ofdev->dev.of_node; |
328 | struct resource res; | 328 | struct resource res; |
329 | struct pmc_type *type; | 329 | const struct pmc_type *type; |
330 | int ret = 0; | 330 | int ret = 0; |
331 | 331 | ||
332 | match = of_match_device(pmc_match, &ofdev->dev); | 332 | match = of_match_device(pmc_match, &ofdev->dev); |
diff --git a/arch/powerpc/platforms/cell/celleb_pci.c b/arch/powerpc/platforms/cell/celleb_pci.c index 5822141aa63f..abc8af43ea7c 100644 --- a/arch/powerpc/platforms/cell/celleb_pci.c +++ b/arch/powerpc/platforms/cell/celleb_pci.c | |||
@@ -472,7 +472,7 @@ int __init celleb_setup_phb(struct pci_controller *phb) | |||
472 | { | 472 | { |
473 | struct device_node *dev = phb->dn; | 473 | struct device_node *dev = phb->dn; |
474 | const struct of_device_id *match; | 474 | const struct of_device_id *match; |
475 | struct celleb_phb_spec *phb_spec; | 475 | const struct celleb_phb_spec *phb_spec; |
476 | int rc; | 476 | int rc; |
477 | 477 | ||
478 | match = of_match_node(celleb_phb_match, dev); | 478 | match = of_match_node(celleb_phb_match, dev); |
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index 6e097de00e09..51ffafae561e 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c | |||
@@ -368,7 +368,7 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev) | |||
368 | int err, i, j, irq_index, count; | 368 | int err, i, j, irq_index, count; |
369 | int rc; | 369 | int rc; |
370 | const u32 *p; | 370 | const u32 *p; |
371 | struct fsl_msi_feature *features; | 371 | const struct fsl_msi_feature *features; |
372 | int len; | 372 | int len; |
373 | u32 offset; | 373 | u32 offset; |
374 | static const u32 all_avail[] = { 0, NR_MSI_IRQS }; | 374 | static const u32 all_avail[] = { 0, NR_MSI_IRQS }; |
@@ -502,15 +502,15 @@ static const struct fsl_msi_feature vmpic_msi_feature = { | |||
502 | static const struct of_device_id fsl_of_msi_ids[] = { | 502 | static const struct of_device_id fsl_of_msi_ids[] = { |
503 | { | 503 | { |
504 | .compatible = "fsl,mpic-msi", | 504 | .compatible = "fsl,mpic-msi", |
505 | .data = (void *)&mpic_msi_feature, | 505 | .data = &mpic_msi_feature, |
506 | }, | 506 | }, |
507 | { | 507 | { |
508 | .compatible = "fsl,ipic-msi", | 508 | .compatible = "fsl,ipic-msi", |
509 | .data = (void *)&ipic_msi_feature, | 509 | .data = &ipic_msi_feature, |
510 | }, | 510 | }, |
511 | { | 511 | { |
512 | .compatible = "fsl,vmpic-msi", | 512 | .compatible = "fsl,vmpic-msi", |
513 | .data = (void *)&vmpic_msi_feature, | 513 | .data = &vmpic_msi_feature, |
514 | }, | 514 | }, |
515 | {} | 515 | {} |
516 | }; | 516 | }; |