aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/gpmc-smsc911x.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/gpmc-smsc911x.c')
-rw-r--r--arch/arm/mach-omap2/gpmc-smsc911x.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c
index b331f3cd38f1..d30293a36494 100644
--- a/arch/arm/mach-omap2/gpmc-smsc911x.c
+++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
@@ -41,16 +41,6 @@ static struct smsc911x_platform_config gpmc_smsc911x_config = {
41 .flags = SMSC911X_USE_16BIT, 41 .flags = SMSC911X_USE_16BIT,
42}; 42};
43 43
44static struct platform_device gpmc_smsc911x_device = {
45 .name = "smsc911x",
46 .id = -1,
47 .num_resources = ARRAY_SIZE(gpmc_smsc911x_resources),
48 .resource = gpmc_smsc911x_resources,
49 .dev = {
50 .platform_data = &gpmc_smsc911x_config,
51 },
52};
53
54/* 44/*
55 * Initialize smsc911x device connected to the GPMC. Note that we 45 * Initialize smsc911x device connected to the GPMC. Note that we
56 * assume that pin multiplexing is done in the board-*.c file, 46 * assume that pin multiplexing is done in the board-*.c file,
@@ -58,6 +48,7 @@ static struct platform_device gpmc_smsc911x_device = {
58 */ 48 */
59void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) 49void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
60{ 50{
51 struct platform_device *pdev;
61 unsigned long cs_mem_base; 52 unsigned long cs_mem_base;
62 int ret; 53 int ret;
63 54
@@ -97,7 +88,10 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
97 if (gpmc_cfg->flags) 88 if (gpmc_cfg->flags)
98 gpmc_smsc911x_config.flags = gpmc_cfg->flags; 89 gpmc_smsc911x_config.flags = gpmc_cfg->flags;
99 90
100 if (platform_device_register(&gpmc_smsc911x_device) < 0) { 91 pdev = platform_device_register_resndata(NULL, "smsc911x", gpmc_cfg->id,
92 gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources),
93 &gpmc_smsc911x_config, sizeof(gpmc_smsc911x_config));
94 if (!pdev) {
101 printk(KERN_ERR "Unable to register smsc911x device\n"); 95 printk(KERN_ERR "Unable to register smsc911x device\n");
102 gpio_free(gpmc_cfg->gpio_reset); 96 gpio_free(gpmc_cfg->gpio_reset);
103 goto free2; 97 goto free2;