mtd: grab a reference to the MTD of_node before registering it
authorBrian Norris <computersforpeace@gmail.com>
Thu, 12 Nov 2015 00:26:04 +0000 (16:26 -0800)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 12 Nov 2015 18:09:55 +0000 (10:09 -0800)
commit215a02fd30871d0d888d27a3154588b66f5dbec2
treeefab2fb6f62ee8a311db5a0665b08f9a19d4592c
parent44ec23c9ecd95d13ec9dd8d0b0dc9e82bd3258ff
mtd: grab a reference to the MTD of_node before registering it

We now stick the device node representing the current MTD (if any) into
sysfs, so let's make sure we have a reference to it before doing that.

Suggested-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/mtdcore.c