lkml.org 
[lkml]   [2011]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subjectregulators: kzalloc doubt
From
Hi guys,

What is the preferred way to use kzalloc? I have seen two ways under
drivers/regulator/.

1-

struct my_regulator_info *info = NULL;

info = kzalloc(sizeof(struct my_regulator_info), GFP_KERNEL);

2-

struct my_regulator_info *info;

info = kzalloc(sizeof(*info), GFP_KERNEL);


\
 
 \ /
  Last update: 2011-05-03 23:57    [W:0.070 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site