From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Chemparathy Subject: Re: [PATCH v6 05/12] davinci: add spi devices on tnetv107x evm Date: Fri, 19 Nov 2010 12:11:57 -0500 Message-ID: <4CE6AFDD.50806@ti.com> References: <1290182156-20104-1-git-send-email-cyril@ti.com> <1290182156-20104-6-git-send-email-cyril@ti.com> <4CE6A516.402@mvista.com> Reply-To: cyril-l0cyMroinI0@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org" , "dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" , "sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org" , "linus.ml.walleij-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" , "broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org" , "grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org" , "rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org" , "alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org" , "spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" , "akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , "lrg-kDsPt+C1G03kYMGBc/C6ZA@public.gmane.org" To: Sergei Shtylyov Return-path: In-Reply-To: <4CE6A516.402-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org Errors-To: davinci-linux-open-source-bounces-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org List-Id: linux-spi.vger.kernel.org On 11/19/2010 11:25 AM, Sergei Shtylyov wrote: [...] >> + ret = gpio_request(EVM_SPI_CS_GPIO, "spi chipsel"); > > Why not just: > > int ret = gpio_request(EVM_SPI_CS_GPIO, "spi chipsel"); > > Also, and empty line after declaration wouldn't hurt. > [...] >> + return gpio_set_value(gpio, cs ? 1 : 0); > > Why not do it right with gpio_direction_output() call? Sure. I might as well change to use gpio_request_one() while I'm at it. If I get enough comments to warrant another revision of this series, I will put in this change at the time. Otherwise, I'd rather roll this in with other patches on my pending list. Is that ok? Thanks for taking a look, Sergei. Regards - Cyril.