Skip to content

Commit

Permalink
leds: Fix &&/|| confusion in leds-pca9532.c
Browse files Browse the repository at this point in the history
This fixes the expression in the driver to do the correct thing,
not that I think anyone would send SND_* without EV_SND.

Thanks to Roel Kluin <roel.kluin@gmail.com> for noticing.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
  • Loading branch information
Riku Voipio authored and Richard Purdie committed Apr 6, 2009
1 parent b0edba7 commit 7fbc3a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/leds/leds-pca9532.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static int pca9532_event(struct input_dev *dev, unsigned int type,
{
struct pca9532_data *data = input_get_drvdata(dev);

if (type != EV_SND && (code != SND_BELL || code != SND_TONE))
if (!(type == EV_SND && (code == SND_BELL || code == SND_TONE)))
return -1;

/* XXX: allow different kind of beeps with psc/pwm modifications */
Expand Down

0 comments on commit 7fbc3a9

Please sign in to comment.