]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: elbc nand: use drvdata to only remove the relevant chip
authorScott Wood <scottwood@freescale.com>
Wed, 6 Jun 2012 23:36:39 +0000 (18:36 -0500)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 6 Jul 2012 17:17:05 +0000 (18:17 +0100)
commit92a6a0fbc3102e3d805e43c0245b287ddca40dac
tree16db5ddbe2f4cab545e64dae0d5b9fad43d503db
parent891fd3e8947401fb119f6f786695058e04407be2
mtd: elbc nand: use drvdata to only remove the relevant chip

Previously the remove method was looping and removing all chips,
which is obviously not the right thing to do — left over from when
the driver was organized differently and that was the remove method for
the entire controller.  This would result in bad things happening if
you have more than one NAND chip, and remove the module.

This also fixes priv->dev to properly point to the chip's device rather than
the controller's.  Until now priv->dev was only used for error/debug prints
(and it's an improvement there), so this shouldn't break anything.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/fsl_elbc_nand.c