• Home
  • Raw
  • Download

Lines Matching refs:func

35 	struct sdio_func *func;						\
37 func = dev_to_sdio_func (dev); \
38 return sprintf (buf, format_string, func->field); \
47 struct sdio_func *func = dev_to_sdio_func (dev); in modalias_show() local
50 func->class, func->vendor, func->device); in modalias_show()
61 static const struct sdio_device_id *sdio_match_one(struct sdio_func *func, in sdio_match_one() argument
64 if (id->class != (__u8)SDIO_ANY_ID && id->class != func->class) in sdio_match_one()
66 if (id->vendor != (__u16)SDIO_ANY_ID && id->vendor != func->vendor) in sdio_match_one()
68 if (id->device != (__u16)SDIO_ANY_ID && id->device != func->device) in sdio_match_one()
73 static const struct sdio_device_id *sdio_match_device(struct sdio_func *func, in sdio_match_device() argument
82 if (sdio_match_one(func, ids)) in sdio_match_device()
93 struct sdio_func *func = dev_to_sdio_func(dev); in sdio_bus_match() local
96 if (sdio_match_device(func, sdrv)) in sdio_bus_match()
105 struct sdio_func *func = dev_to_sdio_func(dev); in sdio_bus_uevent() local
108 "SDIO_CLASS=%02X", func->class)) in sdio_bus_uevent()
112 "SDIO_ID=%04X:%04X", func->vendor, func->device)) in sdio_bus_uevent()
117 func->class, func->vendor, func->device)) in sdio_bus_uevent()
126 struct sdio_func *func = dev_to_sdio_func(dev); in sdio_bus_probe() local
130 id = sdio_match_device(func, drv); in sdio_bus_probe()
136 sdio_claim_host(func); in sdio_bus_probe()
137 ret = sdio_set_block_size(func, 0); in sdio_bus_probe()
138 sdio_release_host(func); in sdio_bus_probe()
142 return drv->probe(func, id); in sdio_bus_probe()
148 struct sdio_func *func = dev_to_sdio_func(dev); in sdio_bus_remove() local
150 drv->remove(func); in sdio_bus_remove()
152 if (func->irq_handler) { in sdio_bus_remove()
155 sdio_claim_host(func); in sdio_bus_remove()
156 sdio_release_irq(func); in sdio_bus_remove()
157 sdio_release_host(func); in sdio_bus_remove()
207 struct sdio_func *func = dev_to_sdio_func(dev); in sdio_release_func() local
214 if (!func->card->host->embedded_sdio_data.funcs) in sdio_release_func()
216 sdio_free_func_cis(func); in sdio_release_func()
218 if (func->info) in sdio_release_func()
219 kfree(func->info); in sdio_release_func()
221 kfree(func); in sdio_release_func()
229 struct sdio_func *func; in sdio_alloc_func() local
231 func = kzalloc(sizeof(struct sdio_func), GFP_KERNEL); in sdio_alloc_func()
232 if (!func) in sdio_alloc_func()
235 func->card = card; in sdio_alloc_func()
237 device_initialize(&func->dev); in sdio_alloc_func()
239 func->dev.parent = &card->dev; in sdio_alloc_func()
240 func->dev.bus = &sdio_bus_type; in sdio_alloc_func()
241 func->dev.release = sdio_release_func; in sdio_alloc_func()
243 return func; in sdio_alloc_func()
249 int sdio_add_func(struct sdio_func *func) in sdio_add_func() argument
253 dev_set_name(&func->dev, "%s:%d", mmc_card_id(func->card), func->num); in sdio_add_func()
255 ret = device_add(&func->dev); in sdio_add_func()
257 sdio_func_set_present(func); in sdio_add_func()
266 void sdio_remove_func(struct sdio_func *func) in sdio_remove_func() argument
268 if (sdio_func_present(func)) in sdio_remove_func()
269 device_del(&func->dev); in sdio_remove_func()
271 put_device(&func->dev); in sdio_remove_func()