public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Chin Liang See <clsee@altera.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv2] socfpga: cleanup socfpga_dw_mmc
Date: Mon, 21 Jul 2014 23:55:09 -0500	[thread overview]
Message-ID: <1406004909.2204.0.camel@clsee-VirtualBox.altera.com> (raw)
In-Reply-To: <20140721113019.GA13727@amd.pavel.ucw.cz>

On Mon, 2014-07-21 at 13:30 +0200, ZY - pavel wrote:
> Cleanups as suggested by wd on mailing list.
> 
> Signed-off-by: Pavel Machek <pavel@denx.de>
> 
> ---
> 
> v2: calloc is actually needed, document it.
> 
> --- a/drivers/mmc/socfpga_dw_mmc.c
> +++ b/drivers/mmc/socfpga_dw_mmc.c
> @@ -16,8 +16,6 @@ static const struct socfpga_clock_manager *clock_manager_base =
>  static const struct socfpga_system_manager *system_manager_base =
>  		(void *)SOCFPGA_SYSMGR_ADDRESS;
>  
> -static char *SOCFPGA_NAME = "SOCFPGA DWMMC";
> -
>  #define CLKMGR_PERPLLGRP_EN_SDMMCCLK_MASK (1 << 8)
>  
>  static void socfpga_dwmci_clksel(struct dwmci_host *host)
> @@ -47,14 +45,16 @@ static void socfpga_dwmci_clksel(struct dwmci_host *host)
>  
>  int socfpga_dwmmc_init(u32 regbase, int bus_width, int index)
>  {
> -	struct dwmci_host *host = NULL;
> +	struct dwmci_host *host;
> +
> +	/* calloc for zero init */
>  	host = calloc(sizeof(struct dwmci_host), 1);
>  	if (!host) {
>  		printf("dwmci_host calloc fail!\n");
>  		return -1;
>  	}
>  
> -	host->name = SOCFPGA_NAME;
> +	host->name = "SOCFPGA DWMMC";
>  	host->ioaddr = (void *)regbase;
>  	host->buswidth = bus_width;
>  	host->clksel = socfpga_dwmci_clksel;
> 
> 

Acked-by: Chin Liang See <clsee@altera.com>

Thanks
Chin Liang

  reply	other threads:[~2014-07-22  4:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 12:34 [U-Boot] socfpga: initialize MMC Pavel Machek
2014-07-16 12:52 ` Wolfgang Denk
2014-07-16 13:13   ` Wolfgang Denk
2014-07-17 11:00     ` Chin Liang See
2014-07-17 12:01       ` Wolfgang Denk
2014-07-19 12:03         ` Pavel Machek
2014-07-21 10:20   ` Pavel Machek
2014-07-21 10:50     ` Wolfgang Denk
2014-07-21 12:05       ` Pavel Machek
2014-07-22  9:33         ` Chin Liang See
2014-09-09 13:16       ` [U-Boot] [PATCH] sort drivers/mmc/Makefile Pavel Machek
2014-09-12  7:25         ` Chin Liang See
2014-11-10 21:29         ` [U-Boot] " Tom Rini
2014-07-21 10:30   ` [U-Boot] [PATCH] socfpga: cleanup socfpga_dw_mmc Pavel Machek
2014-07-21 10:49     ` Chin Liang See
2014-07-21 11:30     ` [U-Boot] [PATCHv2] " Pavel Machek
2014-07-22  4:55       ` Chin Liang See [this message]
2014-08-30 15:13       ` [U-Boot] [U-Boot,PATCHv2] " Tom Rini
2014-07-22  3:22 ` [U-Boot] socfpga: initialize MMC Jaehoon Chung
2014-07-22  8:49   ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406004909.2204.0.camel@clsee-VirtualBox.altera.com \
    --to=clsee@altera.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox