Lines Matching refs:ms_drv

109 static int ms_bus_match(struct device_s * ms_gdev, struct device_driver * ms_drv)  in ms_bus_match()  argument
114 if (ms_gdev->bus_type->match_func(ms_gdev,ms_drv)) in ms_bus_match()
116 ms_gdev->driver = ms_drv; in ms_bus_match()
118 if (ms_drv->probe) in ms_bus_match()
120 if ((ms_err = ms_drv->probe(ms_gdev))) in ms_bus_match()
144 struct device_driver * ms_drv; in ms_device_attach() local
158ms_drv = (struct device_driver *)((char *)_mtr - (char *)offsetof(struct device_driver, bus_list) … in ms_device_attach()
159 if (!ms_bus_match(ms_gdev,ms_drv)) in ms_device_attach()
174 void ms_driver_attach(struct device_driver * ms_drv) in ms_driver_attach() argument
176 struct ms_bus_type * ms_bus = ms_drv->bus; in ms_driver_attach()
190 ms_bus_match(ms_gdev,ms_drv); in ms_driver_attach()
204 struct device_driver * ms_drv = ms_gdev->driver; in ms_device_release_driver() local
206 if (ms_drv) in ms_device_release_driver()
209 if (ms_drv->remove) in ms_device_release_driver()
210 ms_drv->remove(ms_gdev); in ms_device_release_driver()
222 static void ms_driver_detach(struct device_driver * ms_drv) in ms_driver_detach() argument
228 list_for_loop_ex(entry,next,&ms_drv->devices) in ms_driver_detach()
281 int ms_bus_add_driver(struct device_driver * ms_drv) in ms_bus_add_driver() argument
283 struct ms_bus_type * ms_bus = ms_drv->bus; in ms_bus_add_driver()
288 ms_usbhost_debug("bus USB: add driver %s\n",ms_drv->name); in ms_bus_add_driver()
291 ms_insert_list_before(&ms_drv->bus_list,&ms_bus->drivers_list); in ms_bus_add_driver()
292 ms_driver_attach(ms_drv); in ms_bus_add_driver()
304 void ms_bus_remove_driver(struct device_driver * ms_drv) in ms_bus_remove_driver() argument
306 if (ms_drv->bus) in ms_bus_remove_driver()
308 ms_usbhost_debug("bus USB: remove driver %s\n",ms_drv->name); in ms_bus_remove_driver()
309 ms_driver_detach(ms_drv); in ms_bus_remove_driver()
310 ms_list_remove_and_init(&ms_drv->bus_list); in ms_bus_remove_driver()