Lines Matching defs:device
22 u32 irq; /* acpi device irq */
25 unsigned long misc_opened; /* whether the device is open */
27 struct device *dev; /* acpi device */
63 static u32 smo8800_get_irq(struct acpi_device *device)
68 status = acpi_walk_resources(device->handle, METHOD_NAME__CRS,
71 dev_err(&device->dev, "acpi_walk_resources failed\n");
128 clear_bit(0, &smo8800->misc_opened); /* release the device */
139 static int smo8800_add(struct acpi_device *device)
144 smo8800 = devm_kzalloc(&device->dev, sizeof(*smo8800), GFP_KERNEL);
146 dev_err(&device->dev, "failed to allocate device data\n");
150 smo8800->dev = &device->dev;
159 dev_err(&device->dev, "failed to register misc dev: %d\n", err);
163 device->driver_data = smo8800;
165 smo8800->irq = smo8800_get_irq(device);
167 dev_err(&device->dev, "failed to obtain IRQ\n");
177 dev_err(&device->dev,
183 dev_dbg(&device->dev, "device /dev/freefall registered with IRQ %d\n",
192 static int smo8800_remove(struct acpi_device *device)
194 struct smo8800_device *smo8800 = device->driver_data;
198 dev_dbg(&device->dev, "device /dev/freefall unregistered\n");