Lines Matching refs:pdev
39 struct platform_device *pdev = psw->pdev; in switch_work_handler() local
43 kobject_uevent(&pdev->dev.kobj, KOBJ_CHANGE); in switch_work_handler()
46 static int switch_drv_probe(struct platform_device *pdev) in switch_drv_probe() argument
56 irq = platform_get_irq(pdev, 0); in switch_drv_probe()
62 psw_info = pdev->dev.platform_data; in switch_drv_probe()
67 psw_info->name ? psw_info->name : DRV_NAME, pdev); in switch_drv_probe()
72 ret = device_create_file(&pdev->dev, &dev_attr_switch); in switch_drv_probe()
74 dev_err(&pdev->dev, "Failed creating device attrs\n"); in switch_drv_probe()
87 psw->pdev = pdev; in switch_drv_probe()
89 platform_set_drvdata(pdev, psw); in switch_drv_probe()
94 free_irq(irq, pdev); in switch_drv_probe()
100 static int switch_drv_remove(struct platform_device *pdev) in switch_drv_remove() argument
102 struct push_switch *psw = platform_get_drvdata(pdev); in switch_drv_remove()
103 struct push_switch_platform_info *psw_info = pdev->dev.platform_data; in switch_drv_remove()
104 int irq = platform_get_irq(pdev, 0); in switch_drv_remove()
107 device_remove_file(&pdev->dev, &dev_attr_switch); in switch_drv_remove()
109 platform_set_drvdata(pdev, NULL); in switch_drv_remove()
112 free_irq(irq, pdev); in switch_drv_remove()