From patchwork Tue Dec 5 19:12:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 10093651 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 170E060348 for ; Tue, 5 Dec 2017 19:12:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07FA32987E for ; Tue, 5 Dec 2017 19:12:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0EC329882; Tue, 5 Dec 2017 19:12:25 +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 B9CF62987F for ; Tue, 5 Dec 2017 19:12:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750812AbdLETMY (ORCPT ); Tue, 5 Dec 2017 14:12:24 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:18948 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750740AbdLETMX (ORCPT ); Tue, 5 Dec 2017 14:12:23 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id vB5JC2KL031384; Tue, 5 Dec 2017 13:12:02 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1512501122; bh=Rx6jEl/8G0Xt5sRMtloO6WjusWdmhoocMkqZNJulU0A=; h=From:To:CC:Subject:Date; b=ZLCvDkuHrayE1SvJvlr7ZiOSBTwykN+dwfjiDea84ZF5vf9o5+QLSCXCLdPDn+Fi/ agJEZOc3lblukrEvw/GAf08cyb2aNFCidMzB5QH15TUgurs2b6jW/r0+vJXstvV3Ge Tgw6OE/5G8cbXjHYVXyFDGruzsTAwPNdOoYf2fzc= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id vB5JC2sm013999; Tue, 5 Dec 2017 13:12:02 -0600 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Tue, 5 Dec 2017 13:12:01 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Tue, 5 Dec 2017 13:12:01 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id vB5JC1B4004509; Tue, 5 Dec 2017 13:12:01 -0600 Received: from localhost (uda0226330.dhcp.ti.com [128.247.58.154]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id vB5JC1315326; Tue, 5 Dec 2017 13:12:01 -0600 (CST) From: "Andrew F. Davis" To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler CC: , "Andrew F . Davis" Subject: [PATCH] iio: dac: mcp4725: Remove unneeded conversions to bool Date: Tue, 5 Dec 2017 13:12:01 -0600 Message-ID: <20171205191201.21572-1-afd@ti.com> X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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 Found with scripts/coccinelle/misc/boolconv.cocci. Signed-off-by: Andrew F. Davis --- drivers/iio/dac/mcp4725.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/mcp4725.c b/drivers/iio/dac/mcp4725.c index afa856d10c26..8b5aad4c32d9 100644 --- a/drivers/iio/dac/mcp4725.c +++ b/drivers/iio/dac/mcp4725.c @@ -476,7 +476,7 @@ static int mcp4725_probe(struct i2c_client *client, goto err_disable_vref_reg; } pd = (inbuf[0] >> 1) & 0x3; - data->powerdown = pd > 0 ? true : false; + data->powerdown = pd > 0; data->powerdown_mode = pd ? pd - 1 : 2; /* largest resistor to gnd */ data->dac_value = (inbuf[1] << 4) | (inbuf[2] >> 4); if (data->id == MCP4726)