Project

General

Profile

Actions

Feature #3270

open

130: Initialize dynamically allocated sysfs attributes before device_create_file() call

Added by Ilya Shchepetkov over 12 years ago. Updated almost 10 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Start date:
07/24/2012
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

Initialize dynamically allocated sysfs attributes before device_create_file() call to suppress lockdep_init_map() warning if lockdep debugging is enabled (сorresponding call sysfs_attr_init should be before the call device_create_file).

Device attributes can be allocated statically and dynamically. Static allocation of attribute is done via a macro DEVICE_ATTR (instead can be used similar macro, written by the authors of specific driver). Thus, if the attribute is allocated using a macro, there is no need to call a function sysfs_attr_init.

Example:
ibmaem.c

Links
Sample bugfixes f40e1a4, 4ee267b, af3071a, d631323

See also:
device.txt
sysfs.txt


Related issues 1 (0 open1 closed)

Related to C Instrumentation Framework - Feature #3890: Deal with Linux kernel API macros at global scopeClosedEvgeny Novikov01/29/2013

Actions
Actions

Also available in: Atom PDF