driver-core: remove conditionals around devicetree pointers

Having conditional around the of_match_table and the of_node pointers
turns out to make driver code use ugly #ifdef blocks.  Drop the
conditionals and remove the #ifdef blocks from the affected drivers.

Also tidy up minor whitespace issues within the same hunks.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Grant Likely
2011-01-21 09:24:48 -07:00
parent c56eb8fb6d
commit c9e358dfc4
10 changed files with 8 additions and 43 deletions

View File

@@ -1516,21 +1516,17 @@ 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),