On Tue, 17 Jul 2018 14:09:39 +0200 Miquel Raynal <miquel.raynal at bootlin.com> wrote: > > > 1/ if the driver does not implement its own controller, the > > > chip->controller hook is not populated before nand_scan() so it > > > cannot be dereferenced: use chip->hwcontrol instead (which is > > > statically allocated and will be referenced later by chip->controller > > > anyway). > > > > Not related to this patch, but I'd rename chip->hwcontrol into > > chip->dummycontroller or something that clearly shows that this field > > should only be used when the controller driver is dumb and can only > > control a single chip. > > I like this idea but was not sure of a good name for it. If you are > okay I'll do the change in the same patch renaming nand_hw_control -> > nand_controller and nand_hw_control_init -> nand_controller_init. I > think it's related enough. Yep, sounds good. Just remember to mention it in your commit message.