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/net/bmac.c | |
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/net/bmac.c')
-rw-r--r-- | drivers/net/bmac.c | 7 |
1 files changed, 2 insertions, 5 deletions
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, |