Re: [PATCH 1/3] twl4030-madc: copy the device pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You need to send this one to mfd maintainer, separate from this series
perhaps (see MAINTAINERS or just use ./scripts/get_maintainer.pl).

On Thu, Aug 11, 2011 at 6:27 AM, Kyle Manna <kyle@xxxxxxxxxxxxx> wrote:
> Worst case this fixes the following error:
> [   72.086212] (NULL device *): conversion timeout!
>
> Best case it prevents a crash
>
> Signed-off-by: Kyle Manna <kyle@xxxxxxxxxxxxx>
> ---
>  drivers/mfd/twl4030-madc.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c
> index b5d598c..8ef7801 100644
> --- a/drivers/mfd/twl4030-madc.c
> +++ b/drivers/mfd/twl4030-madc.c
> @@ -706,6 +706,9 @@ static int __devinit twl4030_madc_probe(struct platform_device *pdev)
>        if (!madc)
>                return -ENOMEM;
>
> +       /* Copy the pointer to device struct */
> +       madc->dev = &pdev->dev;
> +

This comment is not useful, it's already clear you are copying a pointer.

>        /*
>         * Phoenix provides 2 interrupt lines. The first one is connected to
>         * the OMAP. The other one can be connected to the other processor such
> @@ -733,7 +736,7 @@ static int __devinit twl4030_madc_probe(struct platform_device *pdev)
>        ret = twl_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE,
>                               regval, TWL4030_BCI_BCICTL1);
>        if (ret) {
> -               dev_err(&pdev->dev, "unable to write reg BCI Ctl1 0x%X\n",
> +               dev_err(&pdev->dev, "unable to write reg BCI CTL1 0x%X\n",
>                        TWL4030_BCI_BCICTL1);

Stray change (no mention in commit message), should not be part of this patch.

>                goto err_i2c;
>        }
> --
> 1.7.4.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux