Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363104
b: refs/heads/master
c: 1116575
h: refs/heads/master
v: v3
  • Loading branch information
Jean-Francois Dagenais authored and Greg Kroah-Hartman committed Mar 15, 2013
1 parent bfe0f87 commit fde45b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aceca2854498de7384ee7b44d8eb7820fd4c7f16
refs/heads/master: 1116575d918a7d5fe6d1adf46c5bbdf11dcec51b
7 changes: 3 additions & 4 deletions trunk/drivers/w1/slaves/w1_ds2408.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,7 @@ static ssize_t w1_f29_write_status_control(



#define NB_SYSFS_BIN_FILES 6
static struct bin_attribute w1_f29_sysfs_bin_files[NB_SYSFS_BIN_FILES] = {
static struct bin_attribute w1_f29_sysfs_bin_files[] = {
{
.attr = {
.name = "state",
Expand Down Expand Up @@ -363,7 +362,7 @@ static int w1_f29_add_slave(struct w1_slave *sl)
int err = 0;
int i;

for (i = 0; i < NB_SYSFS_BIN_FILES && !err; ++i)
for (i = 0; i < ARRAY_SIZE(w1_f29_sysfs_bin_files) && !err; ++i)
err = sysfs_create_bin_file(
&sl->dev.kobj,
&(w1_f29_sysfs_bin_files[i]));
Expand All @@ -377,7 +376,7 @@ static int w1_f29_add_slave(struct w1_slave *sl)
static void w1_f29_remove_slave(struct w1_slave *sl)
{
int i;
for (i = NB_SYSFS_BIN_FILES - 1; i >= 0; --i)
for (i = ARRAY_SIZE(w1_f29_sysfs_bin_files) - 1; i >= 0; --i)
sysfs_remove_bin_file(&sl->dev.kobj,
&(w1_f29_sysfs_bin_files[i]));
}
Expand Down

0 comments on commit fde45b2

Please sign in to comment.