Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c8682fb0
Commit
c8682fb0
authored
Apr 22, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/gregkh/linux/driver-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
bad3b717
1c710c64
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
8 deletions
+21
-8
drivers/base/firmware_class.c
drivers/base/firmware_class.c
+1
-1
drivers/char/tipar.c
drivers/char/tipar.c
+1
-1
drivers/i2c/chips/eeprom.c
drivers/i2c/chips/eeprom.c
+1
-0
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_os.c
+2
-0
fs/sysfs/bin.c
fs/sysfs/bin.c
+13
-3
fs/sysfs/symlink.c
fs/sysfs/symlink.c
+3
-3
No files found.
drivers/base/firmware_class.c
View file @
c8682fb0
...
...
@@ -254,7 +254,7 @@ firmware_data_write(struct kobject *kobj,
return
retval
;
}
static
struct
bin_attribute
firmware_attr_data_tmpl
=
{
.
attr
=
{.
name
=
"data"
,
.
mode
=
0644
},
.
attr
=
{.
name
=
"data"
,
.
mode
=
0644
,
.
owner
=
THIS_MODULE
},
.
size
=
0
,
.
read
=
firmware_data_read
,
.
write
=
firmware_data_write
,
...
...
drivers/char/tipar.c
View file @
c8682fb0
...
...
@@ -121,7 +121,7 @@ init_ti_parallel(int minor)
/* ----- global defines ----------------------------------------------- */
#define START(x) { x
=jiffies+HZ/(timeout/10)
; }
#define START(x) { x
= jiffies + (HZ * timeout) / 10
; }
#define WAIT(x) { \
if (time_before((x), jiffies)) return -1; \
if (need_resched()) schedule(); }
...
...
drivers/i2c/chips/eeprom.c
View file @
c8682fb0
...
...
@@ -155,6 +155,7 @@ static struct bin_attribute eeprom_attr = {
.
attr
=
{
.
name
=
"eeprom"
,
.
mode
=
S_IRUGO
,
.
owner
=
THIS_MODULE
,
},
.
size
=
EEPROM_SIZE
,
.
read
=
eeprom_read
,
...
...
drivers/scsi/qla2xxx/qla_os.c
View file @
c8682fb0
...
...
@@ -402,6 +402,7 @@ static struct bin_attribute sysfs_fw_dump_attr = {
.
attr
=
{
.
name
=
"fw_dump"
,
.
mode
=
S_IRUSR
|
S_IWUSR
,
.
owner
=
THIS_MODULE
,
},
.
size
=
0
,
.
read
=
qla2x00_sysfs_read_fw_dump
,
...
...
@@ -415,6 +416,7 @@ static struct bin_attribute sysfs_nvram_attr = {
.
attr
=
{
.
name
=
"nvram"
,
.
mode
=
S_IRUSR
|
S_IWUSR
,
.
owner
=
THIS_MODULE
,
},
.
size
=
sizeof
(
nvram_t
),
.
read
=
qla2x00_sysfs_read_nvram
,
...
...
fs/sysfs/bin.c
View file @
c8682fb0
...
...
@@ -101,19 +101,27 @@ static int open(struct inode * inode, struct file * file)
if
(
!
kobj
||
!
attr
)
goto
Done
;
/* Grab the module reference for this attribute if we have one */
error
=
-
ENODEV
;
if
(
!
try_module_get
(
attr
->
attr
.
owner
))
goto
Done
;
error
=
-
EACCES
;
if
((
file
->
f_mode
&
FMODE_WRITE
)
&&
!
attr
->
write
)
goto
Done
;
goto
Error
;
if
((
file
->
f_mode
&
FMODE_READ
)
&&
!
attr
->
read
)
goto
Done
;
goto
Error
;
error
=
-
ENOMEM
;
file
->
private_data
=
kmalloc
(
PAGE_SIZE
,
GFP_KERNEL
);
if
(
!
file
->
private_data
)
goto
Done
;
goto
Error
;
error
=
0
;
goto
Done
;
Error:
module_put
(
attr
->
attr
.
owner
);
Done:
if
(
error
&&
kobj
)
kobject_put
(
kobj
);
...
...
@@ -123,10 +131,12 @@ static int open(struct inode * inode, struct file * file)
static
int
release
(
struct
inode
*
inode
,
struct
file
*
file
)
{
struct
kobject
*
kobj
=
file
->
f_dentry
->
d_parent
->
d_fsdata
;
struct
bin_attribute
*
attr
=
file
->
f_dentry
->
d_fsdata
;
u8
*
buffer
=
file
->
private_data
;
if
(
kobj
)
kobject_put
(
kobj
);
module_put
(
attr
->
attr
.
owner
);
kfree
(
buffer
);
return
0
;
}
...
...
fs/sysfs/symlink.c
View file @
c8682fb0
...
...
@@ -42,7 +42,7 @@ static int object_path_length(struct kobject * kobj)
struct
kobject
*
p
=
kobj
;
int
length
=
1
;
do
{
length
+=
strlen
(
p
->
name
)
+
1
;
length
+=
strlen
(
kobject_name
(
p
)
)
+
1
;
p
=
p
->
parent
;
}
while
(
p
);
return
length
;
...
...
@@ -54,11 +54,11 @@ static void fill_object_path(struct kobject * kobj, char * buffer, int length)
--
length
;
for
(
p
=
kobj
;
p
;
p
=
p
->
parent
)
{
int
cur
=
strlen
(
p
->
name
);
int
cur
=
strlen
(
kobject_name
(
p
)
);
/* back up enough to print this bus id with '/' */
length
-=
cur
;
strncpy
(
buffer
+
length
,
p
->
name
,
cur
);
strncpy
(
buffer
+
length
,
kobject_name
(
p
)
,
cur
);
*
(
buffer
+
--
length
)
=
'/'
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment