Re: [PATCH 1/6] mmc: host: omap_hsmmc: trivial cleanups

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

 



On Wed, Mar 14, 2012 at 2:48 PM, Felipe Balbi <balbi@xxxxxx> wrote:
> a bunch of non-functional cleanups to the omap_hsmmc
> driver.
>
> It basically decreases indentation level, drop unneded
> dereferences and drop unneded accesses to the platform_device
> structure.
>
> Signed-off-by: Felipe Balbi <balbi@xxxxxx>
> ---
>  drivers/mmc/host/omap_hsmmc.c |  147 ++++++++++++++++++++---------------------
>  1 file changed, 70 insertions(+), 77 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index fd0c661..11fef49 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2104,30 +2104,28 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
>        struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
>        struct resource *res;
>
> -       if (host) {
> -               pm_runtime_get_sync(host->dev);
> -               mmc_remove_host(host->mmc);
> -               if (host->use_reg)
> -                       omap_hsmmc_reg_put(host);
> -               if (host->pdata->cleanup)
> -                       host->pdata->cleanup(&pdev->dev);
> -               free_irq(host->irq, host);
> -               if (mmc_slot(host).card_detect_irq)
> -                       free_irq(mmc_slot(host).card_detect_irq, host);
> -
> -               pm_runtime_put_sync(host->dev);
> -               pm_runtime_disable(host->dev);
> -               clk_put(host->fclk);
> -               if (host->got_dbclk) {
> -                       clk_disable(host->dbclk);
> -                       clk_put(host->dbclk);
> -               }
Hi,

Checking for host NULL is added in suspend/resume, however it is missing in
.remove, is it intentional ?

> +       pm_runtime_get_sync(host->dev);
> +       mmc_remove_host(host->mmc);
> +       if (host->use_reg)
> +               omap_hsmmc_reg_put(host);
> +       if (host->pdata->cleanup)
> +               host->pdata->cleanup(&pdev->dev);
> +       free_irq(host->irq, host);
> +       if (mmc_slot(host).card_detect_irq)
> +               free_irq(mmc_slot(host).card_detect_irq, host);
>
> -               mmc_free_host(host->mmc);
> -               iounmap(host->base);
> -               omap_hsmmc_gpio_free(pdev->dev.platform_data);
> +       pm_runtime_put_sync(host->dev);
> +       pm_runtime_disable(host->dev);
> +       clk_put(host->fclk);
> +       if (host->got_dbclk) {
> +               clk_disable(host->dbclk);
> +               clk_put(host->dbclk);
>        }
>
> +       mmc_free_host(host->mmc);
> +       iounmap(host->base);
> +       omap_hsmmc_gpio_free(pdev->dev.platform_data);
> +
>        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>        if (res)
>                release_mem_region(res->start, resource_size(res));
--
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