lkml.org 
[lkml]   [2013]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/3] misc: bmp085: Add DT bindings for EOC gpio line and direct irq.
Date
On Thursday 14 November 2013, Marek Belisko wrote:
> + if (node && !pdata) {
> + pdata = devm_kzalloc(dev, sizeof(struct bmp085_platform_data),
> + GFP_KERNEL);
> + if (!pdata)
> + return -ENOMEM;
> + }
> +

I generally recommend against allocating platform data from inside the driver,
as this requires more code and more memory than just adding fields to the
driver-specific data structure and copying over the fields from either
DT or the supplied platform data, depending on which one is used.

Arnd


\
 
 \ /
  Last update: 2013-11-15 16:41    [W:0.128 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site