]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: OMAP2+: hwmod: drop unnecessary list initialization
authorFelipe Balbi <balbi@ti.com>
Thu, 13 Nov 2014 16:36:55 +0000 (09:36 -0700)
committerPaul Walmsley <paul@pwsan.com>
Thu, 13 Nov 2014 16:36:55 +0000 (09:36 -0700)
commit4df742f7b949b2870446165485ee367b66ec4ed0
treeafd0c8e73d0ffc2b7f12fab6cbc86bb5e9cfb105
parentbe4c640e014b832c17352d9ee6629b18d2851204
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>
arch/arm/mach-omap2/omap_hwmod.c