diff options
Diffstat (limited to 'drivers/mmc/mmc_sysfs.c')
-rw-r--r-- | drivers/mmc/mmc_sysfs.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/mmc/mmc_sysfs.c b/drivers/mmc/mmc_sysfs.c index ec701667abfc..a2a35fd946ee 100644 --- a/drivers/mmc/mmc_sysfs.c +++ b/drivers/mmc/mmc_sysfs.c | |||
@@ -136,17 +136,7 @@ static int mmc_bus_resume(struct device *dev) | |||
136 | return ret; | 136 | return ret; |
137 | } | 137 | } |
138 | 138 | ||
139 | static struct bus_type mmc_bus_type = { | 139 | static int mmc_bus_probe(struct device *dev) |
140 | .name = "mmc", | ||
141 | .dev_attrs = mmc_dev_attrs, | ||
142 | .match = mmc_bus_match, | ||
143 | .uevent = mmc_bus_uevent, | ||
144 | .suspend = mmc_bus_suspend, | ||
145 | .resume = mmc_bus_resume, | ||
146 | }; | ||
147 | |||
148 | |||
149 | static int mmc_drv_probe(struct device *dev) | ||
150 | { | 140 | { |
151 | struct mmc_driver *drv = to_mmc_driver(dev->driver); | 141 | struct mmc_driver *drv = to_mmc_driver(dev->driver); |
152 | struct mmc_card *card = dev_to_mmc_card(dev); | 142 | struct mmc_card *card = dev_to_mmc_card(dev); |
@@ -154,7 +144,7 @@ static int mmc_drv_probe(struct device *dev) | |||
154 | return drv->probe(card); | 144 | return drv->probe(card); |
155 | } | 145 | } |
156 | 146 | ||
157 | static int mmc_drv_remove(struct device *dev) | 147 | static int mmc_bus_remove(struct device *dev) |
158 | { | 148 | { |
159 | struct mmc_driver *drv = to_mmc_driver(dev->driver); | 149 | struct mmc_driver *drv = to_mmc_driver(dev->driver); |
160 | struct mmc_card *card = dev_to_mmc_card(dev); | 150 | struct mmc_card *card = dev_to_mmc_card(dev); |
@@ -164,6 +154,16 @@ static int mmc_drv_remove(struct device *dev) | |||
164 | return 0; | 154 | return 0; |
165 | } | 155 | } |
166 | 156 | ||
157 | static struct bus_type mmc_bus_type = { | ||
158 | .name = "mmc", | ||
159 | .dev_attrs = mmc_dev_attrs, | ||
160 | .match = mmc_bus_match, | ||
161 | .uevent = mmc_bus_uevent, | ||
162 | .probe = mmc_bus_probe, | ||
163 | .remove = mmc_bus_remove, | ||
164 | .suspend = mmc_bus_suspend, | ||
165 | .resume = mmc_bus_resume, | ||
166 | }; | ||
167 | 167 | ||
168 | /** | 168 | /** |
169 | * mmc_register_driver - register a media driver | 169 | * mmc_register_driver - register a media driver |
@@ -172,8 +172,6 @@ static int mmc_drv_remove(struct device *dev) | |||
172 | int mmc_register_driver(struct mmc_driver *drv) | 172 | int mmc_register_driver(struct mmc_driver *drv) |
173 | { | 173 | { |
174 | drv->drv.bus = &mmc_bus_type; | 174 | drv->drv.bus = &mmc_bus_type; |
175 | drv->drv.probe = mmc_drv_probe; | ||
176 | drv->drv.remove = mmc_drv_remove; | ||
177 | return driver_register(&drv->drv); | 175 | return driver_register(&drv->drv); |
178 | } | 176 | } |
179 | 177 | ||