Skip to contentSkip to conversation

w1: small cleanup in w1_family_notify()

PATCH In review Dan Carpenter 2 participants 2 messages Feb 20, 2015 – Mar 1, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 w1: small cleanup in w1_family_notify()

"sl->family->fops" and "fops" are the same thing, but it's nicer to use "fops" everywhere.

drivers/w1/w1.c +1 -1
index 181f41c..59f932f 100644
@@ -649,7 +649,7 @@ static int w1_family_notify(unsigned long action, struct w1_slave *sl)
 		break;
 	case BUS_NOTIFY_DEL_DEVICE:
 		if (fops->remove_slave)
-			sl->family->fops->remove_slave(sl);
+			fops->remove_slave(sl);
 		if (fops->groups)
 			sysfs_remove_groups(&sl->dev.kobj, fops->groups);
 		break;
#1 lore raw

Hi Dan

20.02.2015, 13:53, "Dan Carpenter" <[email protected]>:

Quoted 4 lines

"sl->family->fops" and "fops" are the same thing, but it's nicer to use "fops" everywhere.

Looks good to me, thank you

Quoted 6 lines
drivers/w1/w1.c +0 -0
index 181f41c..59f932f 100644
@@ -649,7 +649,7 @@ static int w1_family_notify(unsigned long action, struct w1_slave *sl)
 šššššššššššššššššbreak;
Quoted 7 lines

šššššššššcase BUS_NOTIFY_DEL_DEVICE:
šššššššššššššššššif (fops->remove_slave)
- sl->family->fops->remove_slave(sl);
+ fops->remove_slave(sl);
šššššššššššššššššif (fops->groups) šššššššššššššššššššššššššsysfs_remove_groups(&sl->dev.kobj, fops->groups); šššššššššššššššššbreak;

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html