From 2ffe8c5f323c3b9749bf7bc2375d909d20bdbb15 Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Tue, 8 Jun 2010 07:48:19 -0600 Subject: 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 --- drivers/mmc/host/mmc_spi.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/mmc') 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) return 0; } +#if defined(CONFIG_OF) +static struct of_device_id mmc_spi_of_match_table[] __devinitdata = { + { .compatible = "mmc-spi-slot", }, +}; +#endif static struct spi_driver mmc_spi_driver = { .driver = { .name = "mmc_spi", .bus = &spi_bus_type, .owner = THIS_MODULE, +#if defined(CONFIG_OF) + .of_match_table = mmc_spi_of_match_table, +#endif }, .probe = mmc_spi_probe, .remove = __devexit_p(mmc_spi_remove), -- cgit v1.2.3