lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 24 Oct 2013 10:38:06 +0200 From: Oliver Neukum <oneukum@...e.de> To: "hyunhee.kim" <hyunhee.kim@...sung.com> Cc: 'Dmitry Torokhov' <dmitry.torokhov@...il.com>, broonie@...nsource.wolfsonmicro.com, peter.ujfalusi@...com, wfp5p@...ginia.edu, linux-input@...r.kernel.org, linux-kernel@...r.kernel.org, akpm@...ux-foundation.org, kyungmin.park@...sung.com, 'Aristeu Sergio Rozanski Filho' <aris@...vo.org> Subject: Re: [PATCH v2] Input: add regulator haptic driver On Thu, 2013-10-24 at 15:35 +0900, hyunhee.kim wrote: Hi, first of all your mail client mangled the patch. > +static void regulator_haptic_toggle(struct regulator_haptic *haptic, bool > enable) > +{ > + int ret; > + > + mutex_lock(&haptic->mutex); > + if (enable && !haptic->enabled) { > + haptic->enabled = true; > + ret = regulator_enable(haptic->regulator); > + if (ret) > + dev_err(haptic->dev, "failed to enable > regulator\n"); > + } else if (!enable && haptic->enabled) { > + haptic->enabled = false; > + ret = regulator_disable(haptic->regulator); > + if (ret) > + dev_err(haptic->dev, "failed to disable > regulator\n"); > + } > + mutex_unlock(&haptic->mutex); > +} > + Is there anything gained by the toggle parameter? Just code two functions. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists