Lines Matching refs:pdev
31 static int softingcs_reset(struct platform_device *pdev, int v);
32 static int softingcs_enable_irq(struct platform_device *pdev, int v);
176 static int softingcs_reset(struct platform_device *pdev, int v) in softingcs_reset() argument
178 struct pcmcia_device *pcmcia = to_pcmcia_dev(pdev->dev.parent); in softingcs_reset()
180 dev_dbg(&pdev->dev, "pcmcia config [2] %02x\n", v ? 0 : 0x20); in softingcs_reset()
184 static int softingcs_enable_irq(struct platform_device *pdev, int v) in softingcs_enable_irq() argument
186 struct pcmcia_device *pcmcia = to_pcmcia_dev(pdev->dev.parent); in softingcs_enable_irq()
188 dev_dbg(&pdev->dev, "pcmcia config [0] %02x\n", v ? 0x60 : 0); in softingcs_enable_irq()
218 struct platform_device *pdev = pcmcia->priv; in softingcs_remove() local
221 platform_device_unregister(pdev); in softingcs_remove()
232 struct platform_device *pdev = to_platform_device(dev); in softingcs_pdev_release() local
233 kfree(pdev); in softingcs_pdev_release()
239 struct platform_device *pdev; in softingcs_probe() local
243 struct platform_device pdev; in softingcs_probe() member
275 dev->pdev.resource = dev->res; in softingcs_probe()
276 dev->pdev.num_resources = ARRAY_SIZE(dev->res); in softingcs_probe()
277 dev->pdev.dev.release = softingcs_pdev_release; in softingcs_probe()
279 pdev = &dev->pdev; in softingcs_probe()
280 pdev->dev.platform_data = (void *)pdat; in softingcs_probe()
281 pdev->dev.parent = &pcmcia->dev; in softingcs_probe()
282 pcmcia->priv = pdev; in softingcs_probe()
285 pdev->resource[0].flags = IORESOURCE_MEM; in softingcs_probe()
286 pdev->resource[0].start = pres->start; in softingcs_probe()
287 pdev->resource[0].end = pres->end; in softingcs_probe()
289 pdev->resource[1].flags = IORESOURCE_IRQ; in softingcs_probe()
290 pdev->resource[1].start = pcmcia->irq; in softingcs_probe()
291 pdev->resource[1].end = pdev->resource[1].start; in softingcs_probe()
295 pdev->id = softingcs_index++; in softingcs_probe()
297 pdev->name = "softing"; in softingcs_probe()
298 dev_set_name(&pdev->dev, "softingcs.%i", pdev->id); in softingcs_probe()
299 ret = platform_device_register(pdev); in softingcs_probe()
303 dev_info(&pcmcia->dev, "created %s\n", dev_name(&pdev->dev)); in softingcs_probe()