On Tue, 1 Dec 2009 04:15:50 +0100
Janusz Krzysztofik <jkrzy...@tis.icnet.pl> wrote:

>  #define MCBSP_WRITE(mcbsp, reg, val) \
> -             omap_mcbsp_write(mcbsp->io_base, OMAP_MCBSP_REG_##reg, val)
> +             omap_mcbsp_write(mcbsp->io_base, OMAP_MCBSP_REG_##reg, \
> +             mcbsp->reg_cache[OMAP_MCBSP_REG_##reg / OMAP_MCBSP_REG_DRR1] \
> +                     = val)
> +#define MCBSP_READ_CACHE(mcbsp, reg) \
> +             (mcbsp->reg_cache[OMAP_MCBSP_REG_##reg / OMAP_MCBSP_REG_DRR1])
>  
These divisions by DDR1 are confusing. Use rather sizeof:

reg_cache[OMAP_MCBSP_REG_##reg / sizeof(*mcbsp->reg_cache)]


-- 
Jarkko
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to