Lines Matching refs:pdev
36 struct platform_device *pdev = psw->pdev; in switch_work_handler() local
40 kobject_uevent(&pdev->dev.kobj, KOBJ_CHANGE); in switch_work_handler()
43 static int switch_drv_probe(struct platform_device *pdev) in switch_drv_probe() argument
53 irq = platform_get_irq(pdev, 0); in switch_drv_probe()
59 psw_info = pdev->dev.platform_data; in switch_drv_probe()
64 psw_info->name ? psw_info->name : DRV_NAME, pdev); in switch_drv_probe()
69 ret = device_create_file(&pdev->dev, &dev_attr_switch); in switch_drv_probe()
71 dev_err(&pdev->dev, "Failed creating device attrs\n"); in switch_drv_probe()
81 psw->pdev = pdev; in switch_drv_probe()
83 platform_set_drvdata(pdev, psw); in switch_drv_probe()
88 free_irq(irq, pdev); in switch_drv_probe()
94 static int switch_drv_remove(struct platform_device *pdev) in switch_drv_remove() argument
96 struct push_switch *psw = platform_get_drvdata(pdev); in switch_drv_remove()
97 struct push_switch_platform_info *psw_info = pdev->dev.platform_data; in switch_drv_remove()
98 int irq = platform_get_irq(pdev, 0); in switch_drv_remove()
101 device_remove_file(&pdev->dev, &dev_attr_switch); in switch_drv_remove()
103 platform_set_drvdata(pdev, NULL); in switch_drv_remove()
106 free_irq(irq, pdev); in switch_drv_remove()