From patchwork Wed Mar 21 10:29:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 10299109 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 60D6A602B3 for ; Wed, 21 Mar 2018 10:31:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53219296F4 for ; Wed, 21 Mar 2018 10:31:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 478FF2975C; Wed, 21 Mar 2018 10:31:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBD54296F4 for ; Wed, 21 Mar 2018 10:31:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751734AbeCUKbp (ORCPT ); Wed, 21 Mar 2018 06:31:45 -0400 Received: from onstation.org ([52.200.56.107]:47284 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751539AbeCUK3Z (ORCPT ); Wed, 21 Mar 2018 06:29:25 -0400 Received: from xilitla.hsd1.wv.comcast.net (c-98-236-77-125.hsd1.wv.comcast.net [98.236.77.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id 729565BF; Wed, 21 Mar 2018 10:29:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=onstation.org; s=default; t=1521628164; bh=/zkChvsWfl5/BLKWPnXIbkb2AjDi3+0Ftyve1l6pkIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bU63GMfiVpaAsWWJCQ3b6jfYpYz72sTSjtbvvqcwfX4FVikYvLfYpEA2npeL+i/+y 4cls80BbmMfA0GLVi6Cqi8Ru7JKc+EjqLVlp0WQkqF/vI/yrL4ojm6lxLrKBbM61Ys XIEg5YInYtrq0RiWErlDa+Paio94lmtwNyj82PaA= From: Brian Masney To: jic23@kernel.org, linux-iio@vger.kernel.org Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-kernel@vger.kernel.org, Jon.Brenner@ams.com Subject: [PATCH 03/11] staging: iio: tsl2x7x: no need to clear interrupt flag when getting lux Date: Wed, 21 Mar 2018 06:29:04 -0400 Message-Id: <20180321102912.5130-4-masneyb@onstation.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180321102912.5130-1-masneyb@onstation.org> References: <20180321102912.5130-1-masneyb@onstation.org> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP tsl2x7x_get_lux() does not need to clear the interrupt flag when querying the ALS. The interrupt flag is cleared in tsl2x7x_event_handler(). This patches removes the unnecessary code. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c index 59921850a226..9c929e273135 100644 --- a/drivers/staging/iio/light/tsl2x7x.c +++ b/drivers/staging/iio/light/tsl2x7x.c @@ -387,10 +387,6 @@ static int tsl2x7x_get_lux(struct iio_dev *indio_dev) buf[i] = ret; } - ret = tsl2x7x_clear_interrupts(chip, TSL2X7X_CMD_ALS_INT_CLR); - if (ret < 0) - goto out_unlock; - /* extract ALS/lux data */ ch0 = le16_to_cpup((const __le16 *)&buf[0]); ch1 = le16_to_cpup((const __le16 *)&buf[2]);