diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-06-08 09:48:19 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-05 18:14:52 -0400 |
commit | 2ffe8c5f323c3b9749bf7bc2375d909d20bdbb15 (patch) | |
tree | ffbaba1c737fa5da32d9c1a503e58d2896f10be6 /drivers/mmc/host/mmc_spi.c | |
parent | 959e85f7751c33d1a2dabc5cc3fe2ed0db7052e5 (diff) |
of: refactor of_modalias_node() and remove explicit match table.
This patch tightens up the behaviour of of_modalias_node() to be more
predicatable and to eliminate the explicit of_modalias_tablep[] that
is currently used to override the first entry in the compatible list
of a device. The override table was needed originally because spi
and i2c drivers had no way to do of-style matching. Now that all
devices can have an of_node pointer, and all drivers can have an
of_match_table, the explicit override table is no longer needed
because each driver can specify its own OF-style match data.
The mpc8349emitx-mcu driver is modified to explicitly specify the
correct device to bind against.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/mmc/host/mmc_spi.c')
-rw-r--r-- | drivers/mmc/host/mmc_spi.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index ad847a24a675..7b0f3ef50f96 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c | |||
@@ -1533,12 +1533,20 @@ static int __devexit mmc_spi_remove(struct spi_device *spi) | |||
1533 | return 0; | 1533 | return 0; |
1534 | } | 1534 | } |
1535 | 1535 | ||
1536 | #if defined(CONFIG_OF) | ||
1537 | static struct of_device_id mmc_spi_of_match_table[] __devinitdata = { | ||
1538 | { .compatible = "mmc-spi-slot", }, | ||
1539 | }; | ||
1540 | #endif | ||
1536 | 1541 | ||
1537 | static struct spi_driver mmc_spi_driver = { | 1542 | static struct spi_driver mmc_spi_driver = { |
1538 | .driver = { | 1543 | .driver = { |
1539 | .name = "mmc_spi", | 1544 | .name = "mmc_spi", |
1540 | .bus = &spi_bus_type, | 1545 | .bus = &spi_bus_type, |
1541 | .owner = THIS_MODULE, | 1546 | .owner = THIS_MODULE, |
1547 | #if defined(CONFIG_OF) | ||
1548 | .of_match_table = mmc_spi_of_match_table, | ||
1549 | #endif | ||
1542 | }, | 1550 | }, |
1543 | .probe = mmc_spi_probe, | 1551 | .probe = mmc_spi_probe, |
1544 | .remove = __devexit_p(mmc_spi_remove), | 1552 | .remove = __devexit_p(mmc_spi_remove), |