diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-06-02 03:09:18 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-06-02 03:50:38 -0400 |
commit | c2cdf6aba0dfcfb54be646ab630c1bccd180e890 (patch) | |
tree | 97bfd319f0ebe514ef821a080b74860fb9dbaa24 /drivers/net | |
parent | 79905ad50bcf025deb81382413719ed600734941 (diff) |
powerpc/macio: Fix probing of macio devices by using the right of match table
Grant patches added an of mach table to struct device_driver. However,
while he changed the macio device code to use that, he left the match
table pointer in struct macio_driver and didn't update drivers to use
the "new" one, thus breaking the probing.
This completes the change by moving all drivers to setup the "new"
one, removing all traces of the old one, and while at it (since it
changes the exact same locations), I also remove two other duplicates
from struct driver which are the name and owner fields.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bmac.c | 7 | ||||
-rw-r--r-- | drivers/net/mace.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco/airport.c | 7 |
3 files changed, 15 insertions, 6 deletions
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c index 39250b2ca886..959add2410bf 100644 --- a/drivers/net/bmac.c +++ b/drivers/net/bmac.c | |||
@@ -1654,8 +1654,11 @@ MODULE_DEVICE_TABLE (of, bmac_match); | |||
1654 | 1654 | ||
1655 | static struct macio_driver bmac_driver = | 1655 | static struct macio_driver bmac_driver = |
1656 | { | 1656 | { |
1657 | .name = "bmac", | 1657 | .driver = { |
1658 | .match_table = bmac_match, | 1658 | .name = "bmac", |
1659 | .owner = THIS_MODULE, | ||
1660 | .of_match_table = bmac_match, | ||
1661 | }, | ||
1659 | .probe = bmac_probe, | 1662 | .probe = bmac_probe, |
1660 | .remove = bmac_remove, | 1663 | .remove = bmac_remove, |
1661 | #ifdef CONFIG_PM | 1664 | #ifdef CONFIG_PM |
diff --git a/drivers/net/mace.c b/drivers/net/mace.c index b6855a6476f8..1c5221f79d6f 100644 --- a/drivers/net/mace.c +++ b/drivers/net/mace.c | |||
@@ -997,8 +997,11 @@ MODULE_DEVICE_TABLE (of, mace_match); | |||
997 | 997 | ||
998 | static struct macio_driver mace_driver = | 998 | static struct macio_driver mace_driver = |
999 | { | 999 | { |
1000 | .name = "mace", | 1000 | .driver = { |
1001 | .match_table = mace_match, | 1001 | .name = "mace", |
1002 | .owner = THIS_MODULE, | ||
1003 | .of_match_table = mace_match, | ||
1004 | }, | ||
1002 | .probe = mace_probe, | 1005 | .probe = mace_probe, |
1003 | .remove = mace_remove, | 1006 | .remove = mace_remove, |
1004 | }; | 1007 | }; |
diff --git a/drivers/net/wireless/orinoco/airport.c b/drivers/net/wireless/orinoco/airport.c index 9bcee10c9308..4a0a0e5265c9 100644 --- a/drivers/net/wireless/orinoco/airport.c +++ b/drivers/net/wireless/orinoco/airport.c | |||
@@ -239,8 +239,11 @@ static struct of_device_id airport_match[] = | |||
239 | MODULE_DEVICE_TABLE(of, airport_match); | 239 | MODULE_DEVICE_TABLE(of, airport_match); |
240 | 240 | ||
241 | static struct macio_driver airport_driver = { | 241 | static struct macio_driver airport_driver = { |
242 | .name = DRIVER_NAME, | 242 | .driver = { |
243 | .match_table = airport_match, | 243 | .name = DRIVER_NAME, |
244 | .owner = THIS_MODULE, | ||
245 | .of_match_table = airport_match, | ||
246 | }, | ||
244 | .probe = airport_attach, | 247 | .probe = airport_attach, |
245 | .remove = airport_detach, | 248 | .remove = airport_detach, |
246 | .suspend = airport_suspend, | 249 | .suspend = airport_suspend, |