Lines Matching refs:jm

807 	struct jmb38x_ms *jm = pci_get_drvdata(dev);  in jmb38x_ms_suspend()  local
810 for (cnt = 0; cnt < jm->host_cnt; ++cnt) { in jmb38x_ms_suspend()
811 if (!jm->hosts[cnt]) in jmb38x_ms_suspend()
813 memstick_suspend_host(jm->hosts[cnt]); in jmb38x_ms_suspend()
825 struct jmb38x_ms *jm = pci_get_drvdata(dev); in jmb38x_ms_resume() local
837 for (rc = 0; rc < jm->host_cnt; ++rc) { in jmb38x_ms_resume()
838 if (!jm->hosts[rc]) in jmb38x_ms_resume()
840 memstick_resume_host(jm->hosts[rc]); in jmb38x_ms_resume()
841 memstick_detect_change(jm->hosts[rc]); in jmb38x_ms_resume()
870 static struct memstick_host *jmb38x_ms_alloc_host(struct jmb38x_ms *jm, int cnt) in jmb38x_ms_alloc_host() argument
876 &jm->pdev->dev); in jmb38x_ms_alloc_host()
881 host->chip = jm; in jmb38x_ms_alloc_host()
882 host->addr = ioremap(pci_resource_start(jm->pdev, cnt), in jmb38x_ms_alloc_host()
883 pci_resource_len(jm->pdev, cnt)); in jmb38x_ms_alloc_host()
891 host->irq = jm->pdev->irq; in jmb38x_ms_alloc_host()
924 struct jmb38x_ms *jm; in jmb38x_ms_probe() local
953 jm = kzalloc(sizeof(struct jmb38x_ms) in jmb38x_ms_probe()
955 if (!jm) { in jmb38x_ms_probe()
960 jm->pdev = pdev; in jmb38x_ms_probe()
961 jm->host_cnt = cnt; in jmb38x_ms_probe()
962 pci_set_drvdata(pdev, jm); in jmb38x_ms_probe()
964 for (cnt = 0; cnt < jm->host_cnt; ++cnt) { in jmb38x_ms_probe()
965 jm->hosts[cnt] = jmb38x_ms_alloc_host(jm, cnt); in jmb38x_ms_probe()
966 if (!jm->hosts[cnt]) in jmb38x_ms_probe()
969 rc = memstick_add_host(jm->hosts[cnt]); in jmb38x_ms_probe()
972 jmb38x_ms_free_host(jm->hosts[cnt]); in jmb38x_ms_probe()
973 jm->hosts[cnt] = NULL; in jmb38x_ms_probe()
984 kfree(jm); in jmb38x_ms_probe()
995 struct jmb38x_ms *jm = pci_get_drvdata(dev); in jmb38x_ms_remove() local
1000 for (cnt = 0; cnt < jm->host_cnt; ++cnt) { in jmb38x_ms_remove()
1001 if (!jm->hosts[cnt]) in jmb38x_ms_remove()
1004 host = memstick_priv(jm->hosts[cnt]); in jmb38x_ms_remove()
1006 jm->hosts[cnt]->request = jmb38x_ms_dummy_submit; in jmb38x_ms_remove()
1011 dev_dbg(&jm->pdev->dev, "interrupts off\n"); in jmb38x_ms_remove()
1015 jmb38x_ms_complete_cmd(jm->hosts[cnt], 1); in jmb38x_ms_remove()
1019 memstick_remove_host(jm->hosts[cnt]); in jmb38x_ms_remove()
1020 dev_dbg(&jm->pdev->dev, "host removed\n"); in jmb38x_ms_remove()
1022 jmb38x_ms_free_host(jm->hosts[cnt]); in jmb38x_ms_remove()
1030 kfree(jm); in jmb38x_ms_remove()