From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752266AbdCCWVi (ORCPT ); Fri, 3 Mar 2017 17:21:38 -0500 Received: from b.ns.miles-group.at ([95.130.255.144]:44723 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752156AbdCCWVg (ORCPT ); Fri, 3 Mar 2017 17:21:36 -0500 Subject: Re: [PATCH 2/3] mtd: Add support for reading MTD devices via the nvmem API To: Boris Brezillon , Alban References: <1488484223-844-1-git-send-email-albeu@free.fr> <1488484223-844-3-git-send-email-albeu@free.fr> <20170302221803.223ff23b@bbrezillon> <20170303133629.3aac2945@tock> <20170303143658.5d89a329@bbrezillon> <20170303145726.16cd67fd@tock> <20170303151107.36754d19@bbrezillon> Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-mtd@lists.infradead.org, Cyrille Pitchen , Marek Vasut , Brian Norris , David Woodhouse , Mark Rutland , Rob Herring , Maxime Ripard , Srinivas Kandagatla , Moritz Fischer From: Richard Weinberger Message-ID: <54c76650-b61f-8a4c-70c7-febe76e16d3b@nod.at> Date: Fri, 3 Mar 2017 23:21:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20170303151107.36754d19@bbrezillon> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 03.03.2017 um 15:11 schrieb Boris Brezillon: >> And add a list of successfully added notifiers, along with their >> data pointer, to the MTD device. That's simple and would also remove >> the need for notifier to have a private list of their instances as I >> had to do here. > > And then you're abusing the notifier concept. As said earlier, a > notifier is not necessarily using the device, and thus, don't > necessarily need private data. > It's not only about what is the simplest solution for your use case, > but also what other users want/need. Yes, please don't use the mtd_notifier. I strongly vote to embed the nvmem pointer into struct mtd_info. Thanks, //richard