Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757499AbaKTRrP (ORCPT ); Thu, 20 Nov 2014 12:47:15 -0500 Received: from mail-ie0-f181.google.com ([209.85.223.181]:61085 "EHLO mail-ie0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754913AbaKTRrO (ORCPT ); Thu, 20 Nov 2014 12:47:14 -0500 Date: Thu, 20 Nov 2014 09:47:09 -0800 From: Dmitry Torokhov To: Oliver Neukum Cc: scott , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Vincent Wang , Jeff Chuang , Benson Leung , Benjamin Tissoires , Henrik Rydberg , David Herrmann Subject: Re: [PATCH v1] Input: elants_i2c: Add Elan touchscreen support Message-ID: <20141120174709.GA14798@dtor-glaptop> References: <1388146515-19481-1-git-send-email-scott.liu@emc.com.tw> <20141120081113.GA37534@dtor-ws> <1416479490.28599.13.camel@linux-0dmf.site> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1416479490.28599.13.camel@linux-0dmf.site> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Oliver, On Thu, Nov 20, 2014 at 11:31:30AM +0100, Oliver Neukum wrote: > > +static int elants_i2c_initialize(struct elants_data *ts) > > +{ > > + struct i2c_client *client = ts->client; > > + int error, retry_cnt; > > + const u8 hello_packet[] = { 0x55, 0x55, 0x55, 0x55 }; > > + const u8 recov_packet[] = { 0x55, 0x55, 0x80, 0x80 }; > > + u8 buf[HEADER_SIZE]; > > + > > Strictly speaking you should disable preemption here. Umm, why? > > > + for (retry_cnt = 0; retry_cnt < MAX_RETRIES; retry_cnt++) { > > + error = elants_i2c_sw_reset(client); > > + if (error) { > > + /* Continue initializing if it's the last try > > */ > > + if (retry_cnt < MAX_RETRIES - 1) > > + continue; > > + } Thanks. -- Dmitry -- 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/