Lines Matching refs:cnt
637 int cnt; in jmb38x_ms_reset() local
643 for (cnt = 0; cnt < 20; ++cnt) { in jmb38x_ms_reset()
657 for (cnt = 0; cnt < 20; ++cnt) { in jmb38x_ms_reset()
800 int cnt; in jmb38x_ms_suspend() local
802 for (cnt = 0; cnt < jm->host_cnt; ++cnt) { in jmb38x_ms_suspend()
803 if (!jm->hosts[cnt]) in jmb38x_ms_suspend()
805 memstick_suspend_host(jm->hosts[cnt]); in jmb38x_ms_suspend()
832 int cnt, rc = 0; in jmb38x_ms_count_slots() local
834 for (cnt = 0; cnt < PCI_STD_NUM_BARS; ++cnt) { in jmb38x_ms_count_slots()
835 if (!(IORESOURCE_MEM & pci_resource_flags(pdev, cnt))) in jmb38x_ms_count_slots()
838 if (256 != pci_resource_len(pdev, cnt)) in jmb38x_ms_count_slots()
846 static struct memstick_host *jmb38x_ms_alloc_host(struct jmb38x_ms *jm, int cnt) in jmb38x_ms_alloc_host() argument
859 host->addr = ioremap(pci_resource_start(jm->pdev, cnt), in jmb38x_ms_alloc_host()
860 pci_resource_len(jm->pdev, cnt)); in jmb38x_ms_alloc_host()
865 host->id = cnt; in jmb38x_ms_alloc_host()
903 int rc, cnt; in jmb38x_ms_probe() local
923 cnt = jmb38x_ms_count_slots(pdev); in jmb38x_ms_probe()
924 if (!cnt) { in jmb38x_ms_probe()
931 + cnt * sizeof(struct memstick_host *), GFP_KERNEL); in jmb38x_ms_probe()
938 jm->host_cnt = cnt; in jmb38x_ms_probe()
941 for (cnt = 0; cnt < jm->host_cnt; ++cnt) { in jmb38x_ms_probe()
942 jm->hosts[cnt] = jmb38x_ms_alloc_host(jm, cnt); in jmb38x_ms_probe()
943 if (!jm->hosts[cnt]) in jmb38x_ms_probe()
946 rc = memstick_add_host(jm->hosts[cnt]); in jmb38x_ms_probe()
949 jmb38x_ms_free_host(jm->hosts[cnt]); in jmb38x_ms_probe()
950 jm->hosts[cnt] = NULL; in jmb38x_ms_probe()
955 if (cnt) in jmb38x_ms_probe()
974 int cnt; in jmb38x_ms_remove() local
977 for (cnt = 0; cnt < jm->host_cnt; ++cnt) { in jmb38x_ms_remove()
978 if (!jm->hosts[cnt]) in jmb38x_ms_remove()
981 host = memstick_priv(jm->hosts[cnt]); in jmb38x_ms_remove()
983 jm->hosts[cnt]->request = jmb38x_ms_dummy_submit; in jmb38x_ms_remove()
991 jmb38x_ms_complete_cmd(jm->hosts[cnt], 1); in jmb38x_ms_remove()
995 memstick_remove_host(jm->hosts[cnt]); in jmb38x_ms_remove()
998 jmb38x_ms_free_host(jm->hosts[cnt]); in jmb38x_ms_remove()