Files
android_kernel_xiaomi_sm8450/drivers
Elias Vanderstuyft 33b96d9349 Input: document and check on implicitly defined FF_MAX_EFFECTS
There is an undocumented upper bound for the total number of ff effects:
    FF_GAIN (= 96).
This can be found as follows:
- user: write(EV_FF, effect_id, iterations)
    calls kernel: ff->playback(effect_id, ...): starts effect "effect_id"
- user: write(EV_FF, FF_GAIN, gain)
    calls kernel: ff->set_gain(gain, ...): sets gain

A collision occurs when effect_id equals FF_GAIN.
According to input_ff_event(),
FF_GAIN is the smallest value where a collision occurs.
Therefore the greatest safe value for effect_id is FF_GAIN - 1,
and thus the total number of effects should never exceed FF_GAIN.

Define FF_MAX_EFFECTS as FF_GAIN and check on this limit in ff-core.

Signed-off-by: Elias Vanderstuyft <elias.vds@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-10-16 15:32:16 -07:00
..
2015-10-01 22:30:35 +02:00
2013-02-27 19:10:15 -08:00
2015-05-21 11:29:59 +05:30
2014-03-02 19:53:09 -08:00
2015-03-31 12:01:19 -04:00
2015-09-05 19:37:31 +02:00
2014-12-03 18:49:20 -05:00
2014-11-24 07:45:25 +01:00
2015-07-24 15:14:04 -06:00