Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
drivers
hsi
hsi_boardinfo.c
Go to the documentation of this file.
1
/*
2
* HSI clients registration interface
3
*
4
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
5
*
6
* Contact: Carlos Chinea <
[email protected]
>
7
*
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public License
10
* version 2 as published by the Free Software Foundation.
11
*
12
* This program is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20
* 02110-1301 USA
21
*/
22
#include <
linux/hsi/hsi.h
>
23
#include <linux/list.h>
24
#include <linux/slab.h>
25
#include "
hsi_core.h
"
26
27
/*
28
* hsi_board_list is only used internally by the HSI framework.
29
* No one else is allowed to make use of it.
30
*/
31
LIST_HEAD
(hsi_board_list);
32
EXPORT_SYMBOL_GPL
(hsi_board_list);
33
47
int
__init
hsi_register_board_info
(
struct
hsi_board_info
const
*
info
,
48
unsigned
int
len)
49
{
50
struct
hsi_cl_info
*cl_info;
51
52
cl_info = kzalloc(
sizeof
(*cl_info) * len,
GFP_KERNEL
);
53
if
(!cl_info)
54
return
-
ENOMEM
;
55
56
for
(; len; len--, info++, cl_info++) {
57
cl_info->
info
= *
info
;
58
list_add_tail
(&cl_info->
list
, &
hsi_board_list
);
59
}
60
61
return
0;
62
}
Generated on Thu Jan 10 2013 13:34:20 for Linux Kernel by
1.8.2