Lines Matching defs:sdev
84 struct shps_device *sdev = platform_get_drvdata(pdev);
90 mutex_lock(&sdev->lock[type]);
92 value = gpiod_get_value_cansleep(sdev->gpio[type]);
94 mutex_unlock(&sdev->lock[type]);
116 mutex_unlock(&sdev->lock[type]);
124 struct shps_device *sdev = platform_get_drvdata(pdev);
129 if (irq == sdev->irq[type])
144 struct shps_device *sdev = platform_get_drvdata(pdev);
180 sdev->gpio[type] = gpiod;
181 sdev->irq[type] = irq;
188 struct shps_device *sdev = platform_get_drvdata(pdev);
193 if (sdev->irq[i] != SHPS_IRQ_NOT_PRESENT)
194 disable_irq(sdev->irq[i]);
196 mutex_destroy(&sdev->lock[i]);
204 struct shps_device *sdev;
220 sdev = devm_kzalloc(&pdev->dev, sizeof(*sdev), GFP_KERNEL);
221 if (!sdev)
224 platform_set_drvdata(pdev, sdev);
231 sdev->irq[i] = SHPS_IRQ_NOT_PRESENT;
235 mutex_init(&sdev->lock[i]);
246 if (sdev->irq[i] != SHPS_IRQ_NOT_PRESENT)