From patchwork Mon Dec 1 11:57:57 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 11551 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 16EB3DDDE3 for ; Mon, 1 Dec 2008 22:59:42 +1100 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1L77Pl-0000nc-NL; Mon, 01 Dec 2008 11:58:09 +0000 Received: from buzzloop.caiaq.de ([212.112.241.133]) by bombadil.infradead.org with esmtps (Exim 4.68 #1 (Red Hat Linux)) id 1L77Pj-0000iW-LZ for linux-mtd@lists.infradead.org; Mon, 01 Dec 2008 11:58:08 +0000 Received: from localhost (localhost [127.0.0.1]) by buzzloop.caiaq.de (Postfix) with ESMTP id 9B4507F402D; Mon, 1 Dec 2008 12:58:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at buzzloop.caiaq.de Received: from buzzloop.caiaq.de ([127.0.0.1]) by localhost (buzzloop.caiaq.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X-vdphRqzbow; Mon, 1 Dec 2008 12:57:58 +0100 (CET) Received: by buzzloop.caiaq.de (Postfix, from userid 1000) id 12D767F4028; Mon, 1 Dec 2008 12:57:57 +0100 (CET) Date: Mon, 1 Dec 2008 12:57:57 +0100 From: Daniel Mack To: linux-arm-kernel@lists.arm.linux.org.uk Subject: [PATCH] add missing cmdset field in PXA3xx NAND code Message-ID: <20081201115757.GA14755@buzzloop.caiaq.de> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: 0.0 (/) Cc: linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This adds a missing .cmdset parameter for STM 2G NAND chip definition. Even though support for built-in NAND chips is marked deprecated, the driver crashes in __readid() due to a NULL pointer dereference if it's not there. Signed-off-by: Daniel Mack diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index c0fa9c9..ff4d28e 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -269,6 +269,7 @@ static struct pxa3xx_nand_timing stm2GbX16_timing = { static struct pxa3xx_nand_flash stm2GbX16 = { .timing = &stm2GbX16_timing, + .cmdset = &largepage_cmdset, .page_per_block = 64, .page_size = 2048, .flash_width = 16,