can: peak_pci: Fix the way channels are linked together
authorStephane Grosjean <s.grosjean@peak-system.com>
Wed, 1 Feb 2012 10:05:48 +0000 (11:05 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 9 Jun 2014 12:29:14 +0000 (13:29 +0100)
commitb0bcd33beba3ebaceda3524e9872f106fde868de
tree55cc580da47a4fd3121223366737a9e6fb087aa7
parent063ab9cb6308a0806d623c8d6dda5cb2b3b87fce
can: peak_pci: Fix the way channels are linked together

commit 29830406415c227a54af429d7b300aabd4754237 upstream.

Change the way channels objects are linked together by peak_pci_probe()
avoiding any kernel oops when driver is removed. Side effect is that
the list is now browsed from last to first channel.

Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/can/sja1000/peak_pci.c