···352352 kfree(p_dev);353353}354354355355+static void pcmcia_add_pseudo_device(struct pcmcia_socket *s)356356+{357357+ if (!s->pcmcia_state.device_add_pending) {358358+ s->pcmcia_state.device_add_pending = 1;359359+ schedule_work(&s->device_add);360360+ }361361+ return;362362+}355363356364static int pcmcia_device_probe(struct device * dev)357365{358366 struct pcmcia_device *p_dev;359367 struct pcmcia_driver *p_drv;368368+ struct pcmcia_device_id *did;360369 struct pcmcia_socket *s;361370 int ret = 0;362371···401392 }402393403394 ret = p_drv->probe(p_dev);395395+ if (ret)396396+ goto put_module;397397+398398+ /* handle pseudo multifunction devices:399399+ * there are at most two pseudo multifunction devices.400400+ * if we're matching against the first, schedule a401401+ * call which will then check whether there are two402402+ * pseudo devices, and if not, add the second one.403403+ */404404+ did = (struct pcmcia_device_id *) p_dev->dev.driver_data;405405+ if ((did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) &&406406+ (p_dev->socket->device_count == 1) && (p_dev->device_no == 0))407407+ pcmcia_add_pseudo_device(p_dev->socket);404408405409 put_module:406410 if (ret)···682660 s->pcmcia_state.device_add_pending = 0;683661}684662685685-static inline void pcmcia_add_pseudo_device(struct pcmcia_socket *s)686686-{687687- if (!s->pcmcia_state.device_add_pending) {688688- s->pcmcia_state.device_add_pending = 1;689689- schedule_work(&s->device_add);690690- }691691- return;692692-}693693-694663static int pcmcia_requery(struct device *dev, void * _data)695664{696665 struct pcmcia_device *p_dev = to_pcmcia_dev(dev);···768755 }769756770757 if (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) {771771- /* handle pseudo multifunction devices:772772- * there are at most two pseudo multifunction devices.773773- * if we're matching against the first, schedule a774774- * call which will then check whether there are two775775- * pseudo devices, and if not, add the second one.776776- */777777- if (dev->device_no == 0)778778- pcmcia_add_pseudo_device(dev->socket);779779-780758 if (dev->device_no != did->device_no)781759 return 0;782760 }