X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=kernel-power-2.6.28%2Fdebian%2Fpatches%2Fradio-si4713.diff;h=d43848556c850f96bb1e00356a01c1c4da142dd6;hb=0bf229d82ef5d01d668c5684e3828428d6a406e7;hp=c527e70bd410c29d3b0ea09d53c760aacdcb9619;hpb=2ea12d125fda253107923443063eede3a28e22ca;p=kernel-power 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,