Re: [PATCH 5/5] lis3: SPI transport layer

From: Ãric Piel
Date: Tue Mar 03 2009 - 14:59:19 EST


Daniel Mack schreef:
> Make use of the new abstraction layer and add a new transport layer for
> spi. Works fine on a PXA based board.
>
Hi,
Not much to say about this part. Just this minor comment:
:
> +
> +static int lis3_spi_init(struct lis3lv02d *lis3)
> +{
> + u8 reg;
> + int ret;
> +
> + ret = lis3->read(lis3, CTRL_REG1, &reg);
> + if (ret < 0)
> + return ret;
> +
> + reg |= 0x40;
No magic please, use the constants defined in lis3lv02d.h : CTRL1_PD0.


> + return lis3->write(lis3, CTRL_REG1, reg);
> +}

Looks good otherwise :-)
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/