/* Analyse the changes in an effect, and tell if we need to send a periodic parameter effect  */
static int need_period_modifier(struct iforce *iforce, struct ff_effect *old, struct ff_effect *new)
/* Analyse the changes in an effect, and tell if we need to send a periodic parameter effect  */
static int need_period_modifier(struct iforce *iforce, struct ff_effect *old, struct ff_effect *new)
{
	if (new->type != FF_PERIODIC) {
		dev_warn(&iforce->dev->dev, "bad effect type in %s\n",
			 __func__);
		return 0;
	}
	return (old->u.periodic.period != new->u.periodic.period
		|| old->u.periodic.magnitude != new->u.periodic.magnitude
		|| old->u.periodic.offset != new->u.periodic.offset
		|| old->u.periodic.phase != new->u.periodic.phase);
}