Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79005fbd authored by Felipe Balbi's avatar Felipe Balbi Committed by Paul Walmsley
Browse files

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: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
parent 2e1a7b01
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -2832,12 +2832,10 @@ static int __init _add_link(struct omap_hwmod_ocp_if *oi)
	_alloc_links(&ml, &sl);
	_alloc_links(&ml, &sl);


	ml->ocp_if = oi;
	ml->ocp_if = oi;
	INIT_LIST_HEAD(&ml->node);
	list_add(&ml->node, &oi->master->master_ports);
	list_add(&ml->node, &oi->master->master_ports);
	oi->master->masters_cnt++;
	oi->master->masters_cnt++;


	sl->ocp_if = oi;
	sl->ocp_if = oi;
	INIT_LIST_HEAD(&sl->node);
	list_add(&sl->node, &oi->slave->slave_ports);
	list_add(&sl->node, &oi->slave->slave_ports);
	oi->slave->slaves_cnt++;
	oi->slave->slaves_cnt++;