Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757848AbbLBJjw (ORCPT ); Wed, 2 Dec 2015 04:39:52 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:54760 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757766AbbLBJjs (ORCPT ); Wed, 2 Dec 2015 04:39:48 -0500 Message-ID: <565EBC60.7020404@collabora.co.uk> Date: Wed, 02 Dec 2015 09:39:44 +0000 From: Martyn Welch User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 MIME-Version: 1.0 To: Jeremiah Mahler , Olof Johansson , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] Add support for monitoring Chrome OS firmware signals References: <1448997171-7064-3-git-send-email-martyn.welch@collabora.co.uk> <1449001186-24743-1-git-send-email-martyn.welch@collabora.co.uk> <20151202060846.GA3306@localhost.localdomain> In-Reply-To: <20151202060846.GA3306@localhost.localdomain> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 889 Lines: 29 On 02/12/15 06:08, Jeremiah Mahler wrote: > Martyn, > > On Tue, Dec 01, 2015 at 08:19:46PM +0000, Martyn Welch wrote: >> Select Chromebooks have gpio attached to signals used to cause the firmware >> to enter alternative modes of operation and/or control other device > [...] >> + >> +static int chromeos_firmware_probe(struct platform_device *pdev) >> +{ >> + int err; >> + struct chromeos_firmware_data *gpios; >> + >> + gpios = devm_kmalloc(&pdev->dev, sizeof(gpios), GFP_KERNEL); > > Should this be 'sizeof(*gpios)' so it allocates enough room for the > entire struct instead of just the pointer? > Yes, you're right, it should. Martyn -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/