Lines Matching refs:jm
800 struct jmb38x_ms *jm = pci_get_drvdata(dev); in jmb38x_ms_suspend() local
803 for (cnt = 0; cnt < jm->host_cnt; ++cnt) { in jmb38x_ms_suspend()
804 if (!jm->hosts[cnt]) in jmb38x_ms_suspend()
806 memstick_suspend_host(jm->hosts[cnt]); in jmb38x_ms_suspend()
818 struct jmb38x_ms *jm = pci_get_drvdata(dev); in jmb38x_ms_resume() local
830 for (rc = 0; rc < jm->host_cnt; ++rc) { in jmb38x_ms_resume()
831 if (!jm->hosts[rc]) in jmb38x_ms_resume()
833 memstick_resume_host(jm->hosts[rc]); in jmb38x_ms_resume()
834 memstick_detect_change(jm->hosts[rc]); in jmb38x_ms_resume()
863 static struct memstick_host *jmb38x_ms_alloc_host(struct jmb38x_ms *jm, int cnt) in jmb38x_ms_alloc_host() argument
869 &jm->pdev->dev); in jmb38x_ms_alloc_host()
875 host->chip = jm; in jmb38x_ms_alloc_host()
876 host->addr = ioremap(pci_resource_start(jm->pdev, cnt), in jmb38x_ms_alloc_host()
877 pci_resource_len(jm->pdev, cnt)); in jmb38x_ms_alloc_host()
885 host->irq = jm->pdev->irq; in jmb38x_ms_alloc_host()
918 struct jmb38x_ms *jm; in jmb38x_ms_probe() local
947 jm = kzalloc(sizeof(struct jmb38x_ms) in jmb38x_ms_probe()
949 if (!jm) { in jmb38x_ms_probe()
954 jm->pdev = pdev; in jmb38x_ms_probe()
955 jm->host_cnt = cnt; in jmb38x_ms_probe()
956 pci_set_drvdata(pdev, jm); in jmb38x_ms_probe()
958 for (cnt = 0; cnt < jm->host_cnt; ++cnt) { in jmb38x_ms_probe()
959 jm->hosts[cnt] = jmb38x_ms_alloc_host(jm, cnt); in jmb38x_ms_probe()
960 if (!jm->hosts[cnt]) in jmb38x_ms_probe()
963 rc = memstick_add_host(jm->hosts[cnt]); in jmb38x_ms_probe()
966 jmb38x_ms_free_host(jm->hosts[cnt]); in jmb38x_ms_probe()
967 jm->hosts[cnt] = NULL; in jmb38x_ms_probe()
978 kfree(jm); in jmb38x_ms_probe()
989 struct jmb38x_ms *jm = pci_get_drvdata(dev); in jmb38x_ms_remove() local
994 for (cnt = 0; cnt < jm->host_cnt; ++cnt) { in jmb38x_ms_remove()
995 if (!jm->hosts[cnt]) in jmb38x_ms_remove()
998 host = memstick_priv(jm->hosts[cnt]); in jmb38x_ms_remove()
1000 jm->hosts[cnt]->request = jmb38x_ms_dummy_submit; in jmb38x_ms_remove()
1004 dev_dbg(&jm->pdev->dev, "interrupts off\n"); in jmb38x_ms_remove()
1008 jmb38x_ms_complete_cmd(jm->hosts[cnt], 1); in jmb38x_ms_remove()
1012 memstick_remove_host(jm->hosts[cnt]); in jmb38x_ms_remove()
1013 dev_dbg(&jm->pdev->dev, "host removed\n"); in jmb38x_ms_remove()
1015 jmb38x_ms_free_host(jm->hosts[cnt]); in jmb38x_ms_remove()
1023 kfree(jm); in jmb38x_ms_remove()