Lines Matching defs:smo8800

3  *  dell-smo8800.c - Dell Latitude ACPI SMO88XX freefall sensor driver
11 #define DRIVER_NAME "smo8800"
32 struct smo8800_device *smo8800 = data;
34 atomic_inc(&smo8800->counter);
35 wake_up_interruptible(&smo8800->misc_wait);
41 struct smo8800_device *smo8800 = data;
43 dev_info(smo8800->dev, "detected free fall\n");
81 struct smo8800_device *smo8800 = container_of(file->private_data,
91 atomic_set(&smo8800->counter, 0);
92 retval = wait_event_interruptible(smo8800->misc_wait,
93 (data = atomic_xchg(&smo8800->counter, 0)));
113 struct smo8800_device *smo8800 = container_of(file->private_data,
116 if (test_and_set_bit(0, &smo8800->misc_opened))
119 atomic_set(&smo8800->counter, 0);
125 struct smo8800_device *smo8800 = container_of(file->private_data,
128 clear_bit(0, &smo8800->misc_opened); /* release the device */
142 struct smo8800_device *smo8800;
144 smo8800 = devm_kzalloc(&device->dev, sizeof(*smo8800), GFP_KERNEL);
145 if (!smo8800) {
150 smo8800->dev = &device->dev;
151 smo8800->miscdev.minor = MISC_DYNAMIC_MINOR;
152 smo8800->miscdev.name = "freefall";
153 smo8800->miscdev.fops = &smo8800_misc_fops;
155 init_waitqueue_head(&smo8800->misc_wait);
157 err = misc_register(&smo8800->miscdev);
163 device->driver_data = smo8800;
165 smo8800->irq = smo8800_get_irq(device);
166 if (!smo8800->irq) {
172 err = request_threaded_irq(smo8800->irq, smo8800_interrupt_quick,
175 DRIVER_NAME, smo8800);
179 smo8800->irq, err);
184 smo8800->irq);
188 misc_deregister(&smo8800->miscdev);
194 struct smo8800_device *smo8800 = device->driver_data;
196 free_irq(smo8800->irq, smo8800);
197 misc_deregister(&smo8800->miscdev);