public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] w1: small cleanup in w1_family_notify()
@ 2015-02-20 10:53 Dan Carpenter
  2015-03-01  1:49 ` Евгений Поляков
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-02-20 10:53 UTC (permalink / raw)
  To: Evgeniy Polyakov; +Cc: linux-kernel, kernel-janitors

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

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 181f41c..59f932f 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] w1: small cleanup in w1_family_notify()
  2015-02-20 10:53 [patch] w1: small cleanup in w1_family_notify() Dan Carpenter
@ 2015-03-01  1:49 ` Евгений Поляков
  0 siblings, 0 replies; 2+ messages in thread
From: Евгений Поляков @ 2015-03-01  1:49 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org

Hi Dan

20.02.2015, 13:53, "Dan Carpenter" <dan.carpenter@oracle.com>:
> "sl->family->fops" and "fops" are the same thing, but it's nicer to use
> "fops" everywhere.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Looks good to me, thank you

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>

> diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
> index 181f41c..59f932f 100644
> --- a/drivers/w1/w1.c
> +++ b/drivers/w1/w1.c
> @@ -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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-01  1:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-20 10:53 [patch] w1: small cleanup in w1_family_notify() Dan Carpenter
2015-03-01  1:49 ` Евгений Поляков

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox