diff options
author | Jeff Mahoney <jeffm@suse.com> | 2005-07-06 15:44:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-06 15:55:20 -0400 |
commit | 5e6557722e69840506eb8bc5a1edcdb4e447a917 (patch) | |
tree | 965d19e55a56d2daaed47711c01a8c27e29e592c /drivers | |
parent | 159f597a8bd0f1d7650d5e580c93a2666c9c26d1 (diff) |
[PATCH] openfirmware: generate device table for userspace
This converts the usage of struct of_match to struct of_device_id,
similar to pci_device_id. This allows a device table to be generated,
which can be parsed by depmod(8) to generate a map file for module
loading.
In order for hotplug to work with macio devices, patches to
module-init-tools and hotplug must be applied. Those patches are
available at:
ftp://ftp.suse.com/pub/people/jeffm/linux/macio-hotplug/
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-keywest.c | 7 | ||||
-rw-r--r-- | drivers/ide/ppc/pmac.c | 12 | ||||
-rw-r--r-- | drivers/macintosh/macio_asic.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/mediabay.c | 7 | ||||
-rw-r--r-- | drivers/macintosh/therm_pm72.c | 9 | ||||
-rw-r--r-- | drivers/macintosh/therm_windtunnel.c | 6 | ||||
-rw-r--r-- | drivers/net/bmac.c | 7 | ||||
-rw-r--r-- | drivers/net/mace.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/airport.c | 8 | ||||
-rw-r--r-- | drivers/scsi/mac53c94.c | 7 | ||||
-rw-r--r-- | drivers/scsi/mesh.c | 8 | ||||
-rw-r--r-- | drivers/serial/pmac_zilog.c | 9 | ||||
-rw-r--r-- | drivers/video/platinumfb.c | 6 |
13 files changed, 35 insertions, 61 deletions
diff --git a/drivers/i2c/busses/i2c-keywest.c b/drivers/i2c/busses/i2c-keywest.c index 363e545fc01f..94ae808314f7 100644 --- a/drivers/i2c/busses/i2c-keywest.c +++ b/drivers/i2c/busses/i2c-keywest.c | |||
@@ -698,7 +698,7 @@ dispose_iface(struct device *dev) | |||
698 | } | 698 | } |
699 | 699 | ||
700 | static int | 700 | static int |
701 | create_iface_macio(struct macio_dev* dev, const struct of_match *match) | 701 | create_iface_macio(struct macio_dev* dev, const struct of_device_id *match) |
702 | { | 702 | { |
703 | return create_iface(dev->ofdev.node, &dev->ofdev.dev); | 703 | return create_iface(dev->ofdev.node, &dev->ofdev.dev); |
704 | } | 704 | } |
@@ -710,7 +710,7 @@ dispose_iface_macio(struct macio_dev* dev) | |||
710 | } | 710 | } |
711 | 711 | ||
712 | static int | 712 | static int |
713 | create_iface_of_platform(struct of_device* dev, const struct of_match *match) | 713 | create_iface_of_platform(struct of_device* dev, const struct of_device_id *match) |
714 | { | 714 | { |
715 | return create_iface(dev->node, &dev->dev); | 715 | return create_iface(dev->node, &dev->dev); |
716 | } | 716 | } |
@@ -721,10 +721,9 @@ dispose_iface_of_platform(struct of_device* dev) | |||
721 | return dispose_iface(&dev->dev); | 721 | return dispose_iface(&dev->dev); |
722 | } | 722 | } |
723 | 723 | ||
724 | static struct of_match i2c_keywest_match[] = | 724 | static struct of_device_id i2c_keywest_match[] = |
725 | { | 725 | { |
726 | { | 726 | { |
727 | .name = OF_ANY_MATCH, | ||
728 | .type = "i2c", | 727 | .type = "i2c", |
729 | .compatible = "keywest" | 728 | .compatible = "keywest" |
730 | }, | 729 | }, |
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 818380b5fd27..be0fcc8f4b15 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -1419,7 +1419,7 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) | |||
1419 | * Attach to a macio probed interface | 1419 | * Attach to a macio probed interface |
1420 | */ | 1420 | */ |
1421 | static int __devinit | 1421 | static int __devinit |
1422 | pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_match *match) | 1422 | pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) |
1423 | { | 1423 | { |
1424 | void __iomem *base; | 1424 | void __iomem *base; |
1425 | unsigned long regbase; | 1425 | unsigned long regbase; |
@@ -1637,27 +1637,19 @@ pmac_ide_pci_resume(struct pci_dev *pdev) | |||
1637 | return rc; | 1637 | return rc; |
1638 | } | 1638 | } |
1639 | 1639 | ||
1640 | static struct of_match pmac_ide_macio_match[] = | 1640 | static struct of_device_id pmac_ide_macio_match[] = |
1641 | { | 1641 | { |
1642 | { | 1642 | { |
1643 | .name = "IDE", | 1643 | .name = "IDE", |
1644 | .type = OF_ANY_MATCH, | ||
1645 | .compatible = OF_ANY_MATCH | ||
1646 | }, | 1644 | }, |
1647 | { | 1645 | { |
1648 | .name = "ATA", | 1646 | .name = "ATA", |
1649 | .type = OF_ANY_MATCH, | ||
1650 | .compatible = OF_ANY_MATCH | ||
1651 | }, | 1647 | }, |
1652 | { | 1648 | { |
1653 | .name = OF_ANY_MATCH, | ||
1654 | .type = "ide", | 1649 | .type = "ide", |
1655 | .compatible = OF_ANY_MATCH | ||
1656 | }, | 1650 | }, |
1657 | { | 1651 | { |
1658 | .name = OF_ANY_MATCH, | ||
1659 | .type = "ata", | 1652 | .type = "ata", |
1660 | .compatible = OF_ANY_MATCH | ||
1661 | }, | 1653 | }, |
1662 | {}, | 1654 | {}, |
1663 | }; | 1655 | }; |
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index d0bda7e3e6aa..37b18ee08a2d 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
@@ -33,7 +33,7 @@ static int macio_bus_match(struct device *dev, struct device_driver *drv) | |||
33 | { | 33 | { |
34 | struct macio_dev * macio_dev = to_macio_device(dev); | 34 | struct macio_dev * macio_dev = to_macio_device(dev); |
35 | struct macio_driver * macio_drv = to_macio_driver(drv); | 35 | struct macio_driver * macio_drv = to_macio_driver(drv); |
36 | const struct of_match * matches = macio_drv->match_table; | 36 | const struct of_device_id * matches = macio_drv->match_table; |
37 | 37 | ||
38 | if (!matches) | 38 | if (!matches) |
39 | return 0; | 39 | return 0; |
@@ -66,7 +66,7 @@ static int macio_device_probe(struct device *dev) | |||
66 | int error = -ENODEV; | 66 | int error = -ENODEV; |
67 | struct macio_driver *drv; | 67 | struct macio_driver *drv; |
68 | struct macio_dev *macio_dev; | 68 | struct macio_dev *macio_dev; |
69 | const struct of_match *match; | 69 | const struct of_device_id *match; |
70 | 70 | ||
71 | drv = to_macio_driver(dev->driver); | 71 | drv = to_macio_driver(dev->driver); |
72 | macio_dev = to_macio_device(dev); | 72 | macio_dev = to_macio_device(dev); |
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index 4be709e13eec..7c16c25fc5d4 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c | |||
@@ -642,7 +642,7 @@ static int __pmac media_bay_task(void *x) | |||
642 | } | 642 | } |
643 | } | 643 | } |
644 | 644 | ||
645 | static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_match *match) | 645 | static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_device_id *match) |
646 | { | 646 | { |
647 | struct media_bay_info* bay; | 647 | struct media_bay_info* bay; |
648 | u32 __iomem *regbase; | 648 | u32 __iomem *regbase; |
@@ -797,23 +797,20 @@ static struct mb_ops keylargo_mb_ops __pmacdata = { | |||
797 | * Therefore we do it all by polling the media bay once each tick. | 797 | * Therefore we do it all by polling the media bay once each tick. |
798 | */ | 798 | */ |
799 | 799 | ||
800 | static struct of_match media_bay_match[] = | 800 | static struct of_device_id media_bay_match[] = |
801 | { | 801 | { |
802 | { | 802 | { |
803 | .name = "media-bay", | 803 | .name = "media-bay", |
804 | .type = OF_ANY_MATCH, | ||
805 | .compatible = "keylargo-media-bay", | 804 | .compatible = "keylargo-media-bay", |
806 | .data = &keylargo_mb_ops, | 805 | .data = &keylargo_mb_ops, |
807 | }, | 806 | }, |
808 | { | 807 | { |
809 | .name = "media-bay", | 808 | .name = "media-bay", |
810 | .type = OF_ANY_MATCH, | ||
811 | .compatible = "heathrow-media-bay", | 809 | .compatible = "heathrow-media-bay", |
812 | .data = &heathrow_mb_ops, | 810 | .data = &heathrow_mb_ops, |
813 | }, | 811 | }, |
814 | { | 812 | { |
815 | .name = "media-bay", | 813 | .name = "media-bay", |
816 | .type = OF_ANY_MATCH, | ||
817 | .compatible = "ohare-media-bay", | 814 | .compatible = "ohare-media-bay", |
818 | .data = &ohare_mb_ops, | 815 | .data = &ohare_mb_ops, |
819 | }, | 816 | }, |
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index feb4e2413858..703e31973314 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -120,6 +120,7 @@ | |||
120 | #include <asm/system.h> | 120 | #include <asm/system.h> |
121 | #include <asm/sections.h> | 121 | #include <asm/sections.h> |
122 | #include <asm/of_device.h> | 122 | #include <asm/of_device.h> |
123 | #include <asm/macio.h> | ||
123 | 124 | ||
124 | #include "therm_pm72.h" | 125 | #include "therm_pm72.h" |
125 | 126 | ||
@@ -1986,7 +1987,7 @@ static void fcu_lookup_fans(struct device_node *fcu_node) | |||
1986 | } | 1987 | } |
1987 | } | 1988 | } |
1988 | 1989 | ||
1989 | static int fcu_of_probe(struct of_device* dev, const struct of_match *match) | 1990 | static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match) |
1990 | { | 1991 | { |
1991 | int rc; | 1992 | int rc; |
1992 | 1993 | ||
@@ -2009,12 +2010,10 @@ static int fcu_of_remove(struct of_device* dev) | |||
2009 | return 0; | 2010 | return 0; |
2010 | } | 2011 | } |
2011 | 2012 | ||
2012 | static struct of_match fcu_of_match[] = | 2013 | static struct of_device_id fcu_match[] = |
2013 | { | 2014 | { |
2014 | { | 2015 | { |
2015 | .name = OF_ANY_MATCH, | ||
2016 | .type = "fcu", | 2016 | .type = "fcu", |
2017 | .compatible = OF_ANY_MATCH | ||
2018 | }, | 2017 | }, |
2019 | {}, | 2018 | {}, |
2020 | }; | 2019 | }; |
@@ -2022,7 +2021,7 @@ static struct of_match fcu_of_match[] = | |||
2022 | static struct of_platform_driver fcu_of_platform_driver = | 2021 | static struct of_platform_driver fcu_of_platform_driver = |
2023 | { | 2022 | { |
2024 | .name = "temperature", | 2023 | .name = "temperature", |
2025 | .match_table = fcu_of_match, | 2024 | .match_table = fcu_match, |
2026 | .probe = fcu_of_probe, | 2025 | .probe = fcu_of_probe, |
2027 | .remove = fcu_of_remove | 2026 | .remove = fcu_of_remove |
2028 | }; | 2027 | }; |
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index 61400f04015e..cbb72eb0426d 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <asm/system.h> | 43 | #include <asm/system.h> |
44 | #include <asm/sections.h> | 44 | #include <asm/sections.h> |
45 | #include <asm/of_device.h> | 45 | #include <asm/of_device.h> |
46 | #include <asm/macio.h> | ||
46 | 47 | ||
47 | #define LOG_TEMP 0 /* continously log temperature */ | 48 | #define LOG_TEMP 0 /* continously log temperature */ |
48 | 49 | ||
@@ -450,7 +451,7 @@ do_probe( struct i2c_adapter *adapter, int addr, int kind ) | |||
450 | /************************************************************************/ | 451 | /************************************************************************/ |
451 | 452 | ||
452 | static int | 453 | static int |
453 | therm_of_probe( struct of_device *dev, const struct of_match *match ) | 454 | therm_of_probe( struct of_device *dev, const struct of_device_id *match ) |
454 | { | 455 | { |
455 | return i2c_add_driver( &g4fan_driver ); | 456 | return i2c_add_driver( &g4fan_driver ); |
456 | } | 457 | } |
@@ -461,9 +462,8 @@ therm_of_remove( struct of_device *dev ) | |||
461 | return i2c_del_driver( &g4fan_driver ); | 462 | return i2c_del_driver( &g4fan_driver ); |
462 | } | 463 | } |
463 | 464 | ||
464 | static struct of_match therm_of_match[] = {{ | 465 | static struct of_device_id therm_of_match[] = {{ |
465 | .name = "fan", | 466 | .name = "fan", |
466 | .type = OF_ANY_MATCH, | ||
467 | .compatible = "adm1030" | 467 | .compatible = "adm1030" |
468 | }, {} | 468 | }, {} |
469 | }; | 469 | }; |
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c index 00e5257b176f..8dc657fc8afb 100644 --- a/drivers/net/bmac.c +++ b/drivers/net/bmac.c | |||
@@ -1261,7 +1261,7 @@ static void bmac_reset_and_enable(struct net_device *dev) | |||
1261 | spin_unlock_irqrestore(&bp->lock, flags); | 1261 | spin_unlock_irqrestore(&bp->lock, flags); |
1262 | } | 1262 | } |
1263 | 1263 | ||
1264 | static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_match *match) | 1264 | static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_id *match) |
1265 | { | 1265 | { |
1266 | int j, rev, ret; | 1266 | int j, rev, ret; |
1267 | struct bmac_data *bp; | 1267 | struct bmac_data *bp; |
@@ -1645,16 +1645,13 @@ static int __devexit bmac_remove(struct macio_dev *mdev) | |||
1645 | return 0; | 1645 | return 0; |
1646 | } | 1646 | } |
1647 | 1647 | ||
1648 | static struct of_match bmac_match[] = | 1648 | static struct of_device_id bmac_match[] = |
1649 | { | 1649 | { |
1650 | { | 1650 | { |
1651 | .name = "bmac", | 1651 | .name = "bmac", |
1652 | .type = OF_ANY_MATCH, | ||
1653 | .compatible = OF_ANY_MATCH, | ||
1654 | .data = (void *)0, | 1652 | .data = (void *)0, |
1655 | }, | 1653 | }, |
1656 | { | 1654 | { |
1657 | .name = OF_ANY_MATCH, | ||
1658 | .type = "network", | 1655 | .type = "network", |
1659 | .compatible = "bmac+", | 1656 | .compatible = "bmac+", |
1660 | .data = (void *)1, | 1657 | .data = (void *)1, |
diff --git a/drivers/net/mace.c b/drivers/net/mace.c index 6ed2d7dbd44c..81d0a26e4f41 100644 --- a/drivers/net/mace.c +++ b/drivers/net/mace.c | |||
@@ -109,7 +109,7 @@ bitrev(int b) | |||
109 | } | 109 | } |
110 | 110 | ||
111 | 111 | ||
112 | static int __devinit mace_probe(struct macio_dev *mdev, const struct of_match *match) | 112 | static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_id *match) |
113 | { | 113 | { |
114 | struct device_node *mace = macio_get_of_node(mdev); | 114 | struct device_node *mace = macio_get_of_node(mdev); |
115 | struct net_device *dev; | 115 | struct net_device *dev; |
@@ -1009,12 +1009,10 @@ static irqreturn_t mace_rxdma_intr(int irq, void *dev_id, struct pt_regs *regs) | |||
1009 | return IRQ_HANDLED; | 1009 | return IRQ_HANDLED; |
1010 | } | 1010 | } |
1011 | 1011 | ||
1012 | static struct of_match mace_match[] = | 1012 | static struct of_device_id mace_match[] = |
1013 | { | 1013 | { |
1014 | { | 1014 | { |
1015 | .name = "mace", | 1015 | .name = "mace", |
1016 | .type = OF_ANY_MATCH, | ||
1017 | .compatible = OF_ANY_MATCH | ||
1018 | }, | 1016 | }, |
1019 | {}, | 1017 | {}, |
1020 | }; | 1018 | }; |
diff --git a/drivers/net/wireless/airport.c b/drivers/net/wireless/airport.c index b4f4bd7956a2..9d496703c465 100644 --- a/drivers/net/wireless/airport.c +++ b/drivers/net/wireless/airport.c | |||
@@ -184,7 +184,7 @@ static int airport_hard_reset(struct orinoco_private *priv) | |||
184 | } | 184 | } |
185 | 185 | ||
186 | static int | 186 | static int |
187 | airport_attach(struct macio_dev *mdev, const struct of_match *match) | 187 | airport_attach(struct macio_dev *mdev, const struct of_device_id *match) |
188 | { | 188 | { |
189 | struct orinoco_private *priv; | 189 | struct orinoco_private *priv; |
190 | struct net_device *dev; | 190 | struct net_device *dev; |
@@ -266,16 +266,16 @@ MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>"); | |||
266 | MODULE_DESCRIPTION("Driver for the Apple Airport wireless card."); | 266 | MODULE_DESCRIPTION("Driver for the Apple Airport wireless card."); |
267 | MODULE_LICENSE("Dual MPL/GPL"); | 267 | MODULE_LICENSE("Dual MPL/GPL"); |
268 | 268 | ||
269 | static struct of_match airport_match[] = | 269 | static struct of_device_id airport_match[] = |
270 | { | 270 | { |
271 | { | 271 | { |
272 | .name = "radio", | 272 | .name = "radio", |
273 | .type = OF_ANY_MATCH, | ||
274 | .compatible = OF_ANY_MATCH | ||
275 | }, | 273 | }, |
276 | {}, | 274 | {}, |
277 | }; | 275 | }; |
278 | 276 | ||
277 | MODULE_DEVICE_TABLE (of, airport_match); | ||
278 | |||
279 | static struct macio_driver airport_driver = | 279 | static struct macio_driver airport_driver = |
280 | { | 280 | { |
281 | .name = DRIVER_NAME, | 281 | .name = DRIVER_NAME, |
diff --git a/drivers/scsi/mac53c94.c b/drivers/scsi/mac53c94.c index edd47d1f0b17..932dcf0366eb 100644 --- a/drivers/scsi/mac53c94.c +++ b/drivers/scsi/mac53c94.c | |||
@@ -424,7 +424,7 @@ static struct scsi_host_template mac53c94_template = { | |||
424 | .use_clustering = DISABLE_CLUSTERING, | 424 | .use_clustering = DISABLE_CLUSTERING, |
425 | }; | 425 | }; |
426 | 426 | ||
427 | static int mac53c94_probe(struct macio_dev *mdev, const struct of_match *match) | 427 | static int mac53c94_probe(struct macio_dev *mdev, const struct of_device_id *match) |
428 | { | 428 | { |
429 | struct device_node *node = macio_get_of_node(mdev); | 429 | struct device_node *node = macio_get_of_node(mdev); |
430 | struct pci_dev *pdev = macio_get_pci_dev(mdev); | 430 | struct pci_dev *pdev = macio_get_pci_dev(mdev); |
@@ -544,15 +544,14 @@ static int mac53c94_remove(struct macio_dev *mdev) | |||
544 | } | 544 | } |
545 | 545 | ||
546 | 546 | ||
547 | static struct of_match mac53c94_match[] = | 547 | static struct of_device_id mac53c94_match[] = |
548 | { | 548 | { |
549 | { | 549 | { |
550 | .name = "53c94", | 550 | .name = "53c94", |
551 | .type = OF_ANY_MATCH, | ||
552 | .compatible = OF_ANY_MATCH | ||
553 | }, | 551 | }, |
554 | {}, | 552 | {}, |
555 | }; | 553 | }; |
554 | MODULE_DEVICE_TABLE (of, mac53c94_match); | ||
556 | 555 | ||
557 | static struct macio_driver mac53c94_driver = | 556 | static struct macio_driver mac53c94_driver = |
558 | { | 557 | { |
diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c index b05737ae5eff..ff1933298da6 100644 --- a/drivers/scsi/mesh.c +++ b/drivers/scsi/mesh.c | |||
@@ -1847,7 +1847,7 @@ static struct scsi_host_template mesh_template = { | |||
1847 | .use_clustering = DISABLE_CLUSTERING, | 1847 | .use_clustering = DISABLE_CLUSTERING, |
1848 | }; | 1848 | }; |
1849 | 1849 | ||
1850 | static int mesh_probe(struct macio_dev *mdev, const struct of_match *match) | 1850 | static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match) |
1851 | { | 1851 | { |
1852 | struct device_node *mesh = macio_get_of_node(mdev); | 1852 | struct device_node *mesh = macio_get_of_node(mdev); |
1853 | struct pci_dev* pdev = macio_get_pci_dev(mdev); | 1853 | struct pci_dev* pdev = macio_get_pci_dev(mdev); |
@@ -2012,20 +2012,18 @@ static int mesh_remove(struct macio_dev *mdev) | |||
2012 | } | 2012 | } |
2013 | 2013 | ||
2014 | 2014 | ||
2015 | static struct of_match mesh_match[] = | 2015 | static struct of_device_id mesh_match[] = |
2016 | { | 2016 | { |
2017 | { | 2017 | { |
2018 | .name = "mesh", | 2018 | .name = "mesh", |
2019 | .type = OF_ANY_MATCH, | ||
2020 | .compatible = OF_ANY_MATCH | ||
2021 | }, | 2019 | }, |
2022 | { | 2020 | { |
2023 | .name = OF_ANY_MATCH, | ||
2024 | .type = "scsi", | 2021 | .type = "scsi", |
2025 | .compatible = "chrp,mesh0" | 2022 | .compatible = "chrp,mesh0" |
2026 | }, | 2023 | }, |
2027 | {}, | 2024 | {}, |
2028 | }; | 2025 | }; |
2026 | MODULE_DEVICE_TABLE (of, mesh_match); | ||
2029 | 2027 | ||
2030 | static struct macio_driver mesh_driver = | 2028 | static struct macio_driver mesh_driver = |
2031 | { | 2029 | { |
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index 1c9f71617123..7db2f37532cf 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
@@ -1545,7 +1545,7 @@ static void pmz_dispose_port(struct uart_pmac_port *uap) | |||
1545 | /* | 1545 | /* |
1546 | * Called upon match with an escc node in the devive-tree. | 1546 | * Called upon match with an escc node in the devive-tree. |
1547 | */ | 1547 | */ |
1548 | static int pmz_attach(struct macio_dev *mdev, const struct of_match *match) | 1548 | static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match) |
1549 | { | 1549 | { |
1550 | int i; | 1550 | int i; |
1551 | 1551 | ||
@@ -1850,20 +1850,17 @@ err_out: | |||
1850 | return rc; | 1850 | return rc; |
1851 | } | 1851 | } |
1852 | 1852 | ||
1853 | static struct of_match pmz_match[] = | 1853 | static struct of_device_id pmz_match[] = |
1854 | { | 1854 | { |
1855 | { | 1855 | { |
1856 | .name = "ch-a", | 1856 | .name = "ch-a", |
1857 | .type = OF_ANY_MATCH, | ||
1858 | .compatible = OF_ANY_MATCH | ||
1859 | }, | 1857 | }, |
1860 | { | 1858 | { |
1861 | .name = "ch-b", | 1859 | .name = "ch-b", |
1862 | .type = OF_ANY_MATCH, | ||
1863 | .compatible = OF_ANY_MATCH | ||
1864 | }, | 1860 | }, |
1865 | {}, | 1861 | {}, |
1866 | }; | 1862 | }; |
1863 | MODULE_DEVICE_TABLE (of, pmz_match); | ||
1867 | 1864 | ||
1868 | static struct macio_driver pmz_driver = | 1865 | static struct macio_driver pmz_driver = |
1869 | { | 1866 | { |
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c index 3dd1de1539d2..b00887e9851c 100644 --- a/drivers/video/platinumfb.c +++ b/drivers/video/platinumfb.c | |||
@@ -523,7 +523,7 @@ int __init platinumfb_setup(char *options) | |||
523 | #define invalidate_cache(addr) | 523 | #define invalidate_cache(addr) |
524 | #endif | 524 | #endif |
525 | 525 | ||
526 | static int __devinit platinumfb_probe(struct of_device* odev, const struct of_match *match) | 526 | static int __devinit platinumfb_probe(struct of_device* odev, const struct of_device_id *match) |
527 | { | 527 | { |
528 | struct device_node *dp = odev->node; | 528 | struct device_node *dp = odev->node; |
529 | struct fb_info *info; | 529 | struct fb_info *info; |
@@ -647,12 +647,10 @@ static int __devexit platinumfb_remove(struct of_device* odev) | |||
647 | return 0; | 647 | return 0; |
648 | } | 648 | } |
649 | 649 | ||
650 | static struct of_match platinumfb_match[] = | 650 | static struct of_device_id platinumfb_match[] = |
651 | { | 651 | { |
652 | { | 652 | { |
653 | .name = "platinum", | 653 | .name = "platinum", |
654 | .type = OF_ANY_MATCH, | ||
655 | .compatible = OF_ANY_MATCH, | ||
656 | }, | 654 | }, |
657 | {}, | 655 | {}, |
658 | }; | 656 | }; |