lkml.org 
[lkml]   [2013]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH V2 1/2] ARM: mmc: bcm281xx SDHCI driver
Date
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


\
 
 \ /
  Last update: 2013-05-21 21:01    [W:0.778 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site