mtd: ofpart: grab device tree node directly from master device node
authorBrian Norris <computersforpeace@gmail.com>
Sat, 31 Oct 2015 03:33:21 +0000 (20:33 -0700)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 11 Nov 2015 21:45:10 +0000 (13:45 -0800)
commit3b6521eab0386a4854d47b1a01947d7dc46ec98d
tree2d092fee621b1fa3b7e48824db99f8ac2b2b5cb3
parent28b8b26b308e656edfa9467867d5f79212da2ec3
mtd: ofpart: grab device tree node directly from master device node

It seems more logical to use a device node directly associated with the
MTD master device (i.e., mtd->dev.of_node field) rather than requiring
auxiliary partition parser information to be passed in by the driver in
a separate struct.

This patch supports the mtd->dev.of_node field and deprecates the parser
data 'of_node' field

Driver conversions may now follow.

Additional side benefit to assigning mtd->dev.of_node rather than using
parser data: the driver core will automatically create a device -> node
symlink for us.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/ofpart.c
include/linux/mtd/partitions.h