Re: [PATCH V2 1/2] ARM: mmc: bcm281xx SDHCI driver

From: Arnd Bergmann
Date: Tue May 21 2013 - 14:23:48 EST


On Tuesday 21 May 2013, Christian Daudt wrote:
> >> + cfg = devm_kzalloc(&pdev->dev, sizeof(*cfg), GFP_KERNEL);
> >> + if (!cfg) {
> >> + dev_err(&pdev->dev, "Can't allocate platform cfg\n");
> >> + return NULL;
> >> + }
> > Not needed
> what is not needed ?

The allocation, it can be part of the sdhci_pltfm_host data.

> >> + const struct sdhci_pltfm_data *plat_data;
> > make it global.
> why make this global ?

Sorry for being unclear. I mean you can just use &sdhci_pltfm_data_kona
in the probe function, since the data is constant anyway, no need to have
a local variable for pulling this out of the device id.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/