forked from luck/tmp_suning_uos_patched
staging: iio: Fix missing blank line warning
Fixes "Missing a blank line after declarations" checkpatch.pl warning in Documentation/iio_utils.h Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ff39a252cd
commit
79bdd48a7f
|
@ -34,6 +34,7 @@ inline int iioutils_break_up_name(const char *full_name,
|
||||||
char *current;
|
char *current;
|
||||||
char *w, *r;
|
char *w, *r;
|
||||||
char *working;
|
char *working;
|
||||||
|
|
||||||
current = strdup(full_name);
|
current = strdup(full_name);
|
||||||
working = strtok(current, "_\0");
|
working = strtok(current, "_\0");
|
||||||
w = working;
|
w = working;
|
||||||
|
@ -335,6 +336,7 @@ inline int build_channel_array(const char *device_dir,
|
||||||
if (strcmp(ent->d_name + strlen(ent->d_name) - strlen("_en"),
|
if (strcmp(ent->d_name + strlen(ent->d_name) - strlen("_en"),
|
||||||
"_en") == 0) {
|
"_en") == 0) {
|
||||||
int current_enabled = 0;
|
int current_enabled = 0;
|
||||||
|
|
||||||
current = &(*ci_array)[count++];
|
current = &(*ci_array)[count++];
|
||||||
ret = asprintf(&filename,
|
ret = asprintf(&filename,
|
||||||
"%s/%s", scan_el_dir, ent->d_name);
|
"%s/%s", scan_el_dir, ent->d_name);
|
||||||
|
@ -506,6 +508,7 @@ inline int _write_sysfs_int(char *filename, char *basedir, int val, int verify)
|
||||||
FILE *sysfsfp;
|
FILE *sysfsfp;
|
||||||
int test;
|
int test;
|
||||||
char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
|
char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
|
||||||
|
|
||||||
if (temp == NULL)
|
if (temp == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
sprintf(temp, "%s/%s", basedir, filename);
|
sprintf(temp, "%s/%s", basedir, filename);
|
||||||
|
@ -554,6 +557,7 @@ int _write_sysfs_string(char *filename, char *basedir, char *val, int verify)
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
FILE *sysfsfp;
|
FILE *sysfsfp;
|
||||||
char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
|
char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
|
||||||
|
|
||||||
if (temp == NULL) {
|
if (temp == NULL) {
|
||||||
printf("Memory allocation failed\n");
|
printf("Memory allocation failed\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -614,6 +618,7 @@ int read_sysfs_posint(char *filename, char *basedir)
|
||||||
int ret;
|
int ret;
|
||||||
FILE *sysfsfp;
|
FILE *sysfsfp;
|
||||||
char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
|
char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
|
||||||
|
|
||||||
if (temp == NULL) {
|
if (temp == NULL) {
|
||||||
printf("Memory allocation failed");
|
printf("Memory allocation failed");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -636,6 +641,7 @@ int read_sysfs_float(char *filename, char *basedir, float *val)
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
FILE *sysfsfp;
|
FILE *sysfsfp;
|
||||||
char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
|
char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
|
||||||
|
|
||||||
if (temp == NULL) {
|
if (temp == NULL) {
|
||||||
printf("Memory allocation failed");
|
printf("Memory allocation failed");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -658,6 +664,7 @@ int read_sysfs_string(const char *filename, const char *basedir, char *str)
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
FILE *sysfsfp;
|
FILE *sysfsfp;
|
||||||
char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
|
char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
|
||||||
|
|
||||||
if (temp == NULL) {
|
if (temp == NULL) {
|
||||||
printf("Memory allocation failed");
|
printf("Memory allocation failed");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user