On Wed,  2 Jul 2008 16:36:36 +0300, Viktor Rosendahl
<[EMAIL PROTECTED]> wrote:
> req is an automatic variable and thus we cannot rely on it being
> initialized to
> zero (I am leaving the 0!= NULL discussion aside). Other functions test
> if this pointer is NULL, in order to determine whether it is a valid
> address or
> not.


> +             req.func_cb     = NULL;

maybe below is a better patch:

diff --git a/drivers/i2c/chips/twl4030-madc.c
b/drivers/i2c/chips/twl4030-madc.c
index 72b126b..6d8915e 100644
--- a/drivers/i2c/chips/twl4030-madc.c
+++ b/drivers/i2c/chips/twl4030-madc.c
@@ -360,7 +360,7 @@ static int twl4030_madc_ioctl(struct inode *inode,
struct file *filp,
 
        switch (cmd) {
        case TWL4030_MADC_IOCX_ADC_RAW_READ: {
-               struct twl4030_madc_request req;
+               static struct twl4030_madc_request req;
                if (par.channel >= TWL4030_MADC_MAX_CHANNELS)
                        return -EINVAL;
-- 
Best Regards,

Felipe Balbi
http://blog.felipebalbi.com
[EMAIL PROTECTED]

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

Reply via email to