diff options
author | Felipe Balbi <balbi@ti.com> | 2014-11-13 11:36:55 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2014-11-13 11:36:55 -0500 |
commit | 79005fbd3e1d671d08c45c9140ee9826efdc367c (patch) | |
tree | afd0c8e73d0ffc2b7f12fab6cbc86bb5e9cfb105 | |
parent | 2e1a7b014f9c3d61fbf12b429f0479242264dbec (diff) |
ARM: OMAP2+: hwmod: drop unnecessary list initialization
ml->node and sl->node are currently initialized
by means of INIT_LIST_HEAD(). That initialiation
is followed by a list_add() call.
Looking at what both these functions do we will have:
ml->node.next = &ml->node;
ml->node.prev = &ml->node;
oi->master->master_ports.next.prev = &ml->node;
ml->node.next = &oi->master->master_ports.next;
ml->node.prev = &oi->master->master_ports;
oi->master->master_ports.next = &ml->node;
from this, it's clear that both INIT_LIST_HEAD() calls
are unnecessary and can be safely removed.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 716247ed9e0c..acae6d5d1151 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -2832,12 +2832,10 @@ static int __init _add_link(struct omap_hwmod_ocp_if *oi) | |||
2832 | _alloc_links(&ml, &sl); | 2832 | _alloc_links(&ml, &sl); |
2833 | 2833 | ||
2834 | ml->ocp_if = oi; | 2834 | ml->ocp_if = oi; |
2835 | INIT_LIST_HEAD(&ml->node); | ||
2836 | list_add(&ml->node, &oi->master->master_ports); | 2835 | list_add(&ml->node, &oi->master->master_ports); |
2837 | oi->master->masters_cnt++; | 2836 | oi->master->masters_cnt++; |
2838 | 2837 | ||
2839 | sl->ocp_if = oi; | 2838 | sl->ocp_if = oi; |
2840 | INIT_LIST_HEAD(&sl->node); | ||
2841 | list_add(&sl->node, &oi->slave->slave_ports); | 2839 | list_add(&sl->node, &oi->slave->slave_ports); |
2842 | oi->slave->slaves_cnt++; | 2840 | oi->slave->slaves_cnt++; |
2843 | 2841 | ||