Hi!
Yes, this looks badly needed.
> As you can see from the comments at the beginning of the patch, the old
> driver got some stuff wrong about the meaning of EC readouts. This patch
> preserves the old broken behavior; it will be fixed in a later patch.
>
> Signed-off-by: Shem Multinymous <[email protected]>
Signed-off-by: Pavel Machek <[email protected]>
> @@ -209,77 +131,79 @@ static int hdaps_read_pair(unsigned int
> * hdaps_device_init - initialize the accelerometer. Returns zero on success
> * and negative error code on failure. Can sleep.
> */
> +#define ABORT_INIT(msg) { printk(KERN_ERR "hdaps init: %s\n", msg); goto bad; }
No.. macro with embedded goto is *evil*.
> + if (thinkpad_ec_read_row(&args, &data))
> + ABORT_INIT("read1");
> + if (data.val[0xF]!=0x00)
> + ABORT_INIT("check1");
!=0 in if is evil...
> + mode = data.val[0x1];
> +
> + printk(KERN_DEBUG "hdaps: initial mode latch is 0x%02x\n", mode);
> + if (mode==0x00)
if !mode ?
Pavel
--
Thanks for all the (sleeping) penguins.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]