]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mtd: nand: Drop mtd.owner requirement in nand_scan
authorEzequiel García <ezequiel@vanguardiasur.com.ar>
Fri, 1 Apr 2016 21:29:23 +0000 (18:29 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 May 2016 21:48:52 +0000 (14:48 -0700)
commit35bfb7949b7f23cdbfda12d83a8038f640b49141
tree36e269ae548abf1dc973fac91f28bd64e44c0e3a
parent67891850e58b0190005441cf4f54da957fed8e01
mtd: nand: Drop mtd.owner requirement in nand_scan

commit 20c07a5bf094198ff2382aa5e7c930b3c9807792 upstream.

Since commit 807f16d4db95 ("mtd: core: set some defaults
when dev.parent is set"), it's now legal for drivers
to call nand_scan and nand_scan_ident without setting
mtd.owner.

Drop the check and while at it remove the BUG() abuse.

Fixes: 807f16d4db95 ("mtd: core: set some defaults when dev.parent is set")
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Brian: editorial note - while commit 807f16d4db95 wasn't explicitly
    broken, some follow-up commits in the v4.4 release broke a few
    drivers, since they would hit this BUG() if they used nand_scan()
    and were built as modules]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/nand_base.c