From: Riku Voipio Date: Tue, 3 Mar 2009 20:13:06 +0000 (+0200) Subject: leds: Fix &&/|| confusion in leds-pca9532.c X-Git-Tag: 2.1b_release~13256^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7fbc3a9b132e93b2ba1fd889c1ad8a4135731cc3;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git leds: Fix &&/|| confusion in leds-pca9532.c 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 for noticing. Signed-off-by: Riku Voipio Signed-off-by: Richard Purdie --- diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c index bd3b431..3937244 100644 --- a/drivers/leds/leds-pca9532.c +++ b/drivers/leds/leds-pca9532.c @@ -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 */