needs_update = true;
printk(KERN_NOTICE "KLGDFF: Altered combinable effect, total active effects %lu\n", active_effects);
break;
+ case FFPL_TO_UPLOAD:
+ eff->state = FFPL_UPLOADED;
+ printk(KERN_NOTICE "KLGDFF: Combinable effect to upload, marking as uploaded\n");
+ break;
default:
needs_update = true;
eff->state = FFPL_EMPTY;
/* Destroy request - input device is being destroyed */
static void ffpl_destroy_rq(struct ff_device *ff)
-{
+{
struct klgd_plugin *self = ff->private;
struct klgd_plugin_private *priv = self->private;
s = klgd_alloc_stream();
if (!s)
return NULL; /* TODO: Error handling */
-
+
ret = ffpl_handle_combinable_effects(priv, s);
if (ret)
printk(KERN_WARNING "KLGDFF: Cannot process combinable effects, ret %d\n", ret);
const bool ignore_combined)
{
int ret;
-
+
/* Latest effect is of different type than currently active effect,
* remove it from the device and upload the latest one */
if (eff->replace) {
if (ret)
break;
default:
- /* Nothing to do - the effect that is replacing the old effect is about to be erased anyway
+ /* Nothing to do - the effect that is replacing the old effect is about to be erased anyway
* State of the effect to be replaced should also never be EMPTY */
ret = 0;
break;
return 0;
}
-
+
/* Initialize the plugin */
int ffpl_init_plugin(struct klgd_plugin **plugin, struct input_dev *dev, const size_t effect_count,
const unsigned long supported_effects,
{
struct klgd_plugin *self;
struct klgd_plugin_private *priv;
- int ret, idx;
+ int ret, idx;
self = kzalloc(sizeof(struct klgd_plugin), GFP_KERNEL);
if (!self)