• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/input/

Lines Matching defs:ff

26 #define debug(format, arg...) pr_debug("ff-core: " format "\n", ## arg)
36 static int check_effect_access(struct ff_device *ff, int effect_id,
39 if (effect_id < 0 || effect_id >= ff->max_effects ||
40 !ff->effect_owners[effect_id])
43 if (file && ff->effect_owners[effect_id] != file)
63 static int compat_effect(struct ff_device *ff, struct ff_effect *effect)
69 if (!test_bit(FF_PERIODIC, ff->ffbit))
107 struct ff_device *ff = dev->ff;
129 if (!test_bit(effect->type, ff->ffbit)) {
130 ret = compat_effect(ff, effect);
135 mutex_lock(&ff->mutex);
138 for (id = 0; id < ff->max_effects; id++)
139 if (!ff->effect_owners[id])
142 if (id >= ff->max_effects) {
153 ret = check_effect_access(ff, id, file);
157 old = &ff->effects[id];
165 ret = ff->upload(dev, effect, old);
169 ff->effects[id] = *effect;
170 ff->effect_owners[id] = file;
173 mutex_unlock(&ff->mutex);
185 struct ff_device *ff = dev->ff;
188 error = check_effect_access(ff, effect_id, file);
192 ff->playback(dev, effect_id, 0);
194 if (ff->erase) {
195 error = ff->erase(dev, effect_id);
200 ff->effect_owners[effect_id] = NULL;
217 struct ff_device *ff = dev->ff;
223 mutex_lock(&ff->mutex);
225 mutex_unlock(&ff->mutex);
236 struct ff_device *ff = dev->ff;
241 mutex_lock(&ff->mutex);
243 for (i = 0; i < ff->max_effects; i++)
246 mutex_unlock(&ff->mutex);
261 struct ff_device *ff = dev->ff;
266 mutex_lock(&ff->mutex);
273 ff->set_gain(dev, value);
280 ff->set_autocenter(dev, value);
284 if (check_effect_access(ff, code, NULL) == 0)
285 ff->playback(dev, code, value);
289 mutex_unlock(&ff->mutex);
302 * Once ff device is created you need to setup its upload, erase,
307 struct ff_device *ff;
312 "ff-core: cannot allocate device without any effects\n");
316 ff = kzalloc(sizeof(struct ff_device) +
318 if (!ff)
321 ff->effects = kcalloc(max_effects, sizeof(struct ff_effect),
323 if (!ff->effects) {
324 kfree(ff);
328 ff->max_effects = max_effects;
329 mutex_init(&ff->mutex);
331 dev->ff = ff;
336 /* Copy "true" bits into ff device bitmap */
339 set_bit(i, ff->ffbit);
342 if (test_bit(FF_PERIODIC, ff->ffbit))
360 if (dev->ff) {
361 if (dev->ff->destroy)
362 dev->ff->destroy(dev->ff);
363 kfree(dev->ff->private);
364 kfree(dev->ff);
365 dev->ff = NULL;