From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969979AbdAFXx3 (ORCPT ); Fri, 6 Jan 2017 18:53:29 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35471 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968462AbdAFXx1 (ORCPT ); Fri, 6 Jan 2017 18:53:27 -0500 Subject: Re: [PATCH v4 07/15] mtd: nand: move Samsung specific init/detection logic in nand_samsung.c To: Boris Brezillon References: <1483448495-31607-1-git-send-email-boris.brezillon@free-electrons.com> <1483448495-31607-8-git-send-email-boris.brezillon@free-electrons.com> <09da7377-1323-0794-fe61-34fd06e35404@gmail.com> <20170104180813.700823eb@bbrezillon> Cc: Richard Weinberger , linux-mtd@lists.infradead.org, David Woodhouse , Brian Norris , Cyrille Pitchen , Icenowy Zheng , Valdis.Kletnieks@vt.edu, linux-kernel@vger.kernel.org From: Marek Vasut Message-ID: <4982cf88-ff7e-20c9-a158-e1e3826c0762@gmail.com> Date: Sat, 7 Jan 2017 00:53:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170104180813.700823eb@bbrezillon> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/04/2017 06:08 PM, Boris Brezillon wrote: > On Wed, 4 Jan 2017 16:14:07 +0100 > Marek Vasut wrote: > >> On 01/03/2017 02:01 PM, Boris Brezillon wrote: >>> Move Samsung specific initialization and detection logic into >>> nand_samsung.c. This is part of the "separate vendor specific code from >>> core" cleanup process. >>> >>> Signed-off-by: Boris Brezillon >> >> [...] >> >>> diff --git a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c >>> index b3a332f37e14..05e9366696c9 100644 >>> --- a/drivers/mtd/nand/nand_ids.c >>> +++ b/drivers/mtd/nand/nand_ids.c >>> @@ -10,7 +10,7 @@ >>> #include >>> #include >>> >>> -#define LP_OPTIONS NAND_SAMSUNG_LP_OPTIONS >>> +#define LP_OPTIONS 0 >>> #define LP_OPTIONS16 (LP_OPTIONS | NAND_BUSWIDTH_16) >>> >>> #define SP_OPTIONS NAND_NEED_READRDY >>> @@ -169,10 +169,12 @@ struct nand_flash_dev nand_flash_ids[] = { >>> }; >>> >>> /* Manufacturer IDs */ >>> +extern const struct nand_manufacturer_ops samsung_nand_manuf_ops; >> >> Is the extern needed ? > > Yes, unless you have another solution. If you remove the extern keyword > you just redeclare samsung_nand_manuf_ops here, which is not what we > want. Maybe some accessor function can help ? -- Best regards, Marek Vasut