From: Pali Rohár Date: Thu, 28 Jun 2012 14:17:00 +0000 (+0200) Subject: Fix radio-si4713 driver, fix hang: echo 0 > lock X-Git-Tag: wl1251-maemo-0.2~5 X-Git-Url: https://vcs.maemo.org/git/?p=kernel-power;a=commitdiff_plain;h=0bf229d82ef5d01d668c5684e3828428d6a406e7 Fix radio-si4713 driver, fix hang: echo 0 > lock --- diff --git a/kernel-power-2.6.28/debian/patches/radio-si4713.diff b/kernel-power-2.6.28/debian/patches/radio-si4713.diff index c527e70..d438485 100644 --- a/kernel-power-2.6.28/debian/patches/radio-si4713.diff +++ b/kernel-power-2.6.28/debian/patches/radio-si4713.diff @@ -27,22 +27,24 @@ /* * Sysfs properties -@@ -193,17 +180,7 @@ static ssize_t si4713_lock_write(struct +@@ -193,17 +180,15 @@ static ssize_t si4713_lock_write(struct const char *buf, size_t count) { -- int l; -- + int l; + - if (config_locked) - return -EPERM; - -- sscanf(buf, "%d", &l); -- + sscanf(buf, "%d", &l); + - if (l != 0) - config_locked = 1; -- -- return count; -+ return sscanf(buf, "%d", &config_locked); ++ if (l != 0 && l != 1) ++ return -EINVAL; + ++ config_locked = l; + return count; } static ssize_t si4713_lock_read(struct device *dev,