From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C6CCC433EF for ; Thu, 16 Jun 2022 22:03:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=RCu/CbMFDG+sy9AeWNsNz+WXNP9d2kzy/0a81VlXD4Q=; b=MKNKNVlPdCuid6 wTuG+tc9z1OOPK3fXhNUUc0tbmdkxFw8SFn6fbuuSOxNY8rYZTPSKAPun+gttmUacyI9d0E+TNMlz axe6gEG6xydb7l80nDit+I8+yqZlGVMMw109QIJZbJpH0gmOGXhKDMOFBRvQN7won9VtJUlfWOzzI vYv3HK68YcEERdxzJp9cq6pnrG+6s60hW+QIY9X7KtUT1cZQN1emFf5taJ9NRx5zo7ia5k5Hd9Wm+ c0shlxpVy+MEZq5a7RqpTwo+UGXZb9GaOswSDks+VeoV3YjRlAOqrZCyT1N4oFf3B9lC/zc8ro6S5 rTa/gIyJlGeFQcF6/ekQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1xZR-004WpA-HY; Thu, 16 Jun 2022 22:02:33 +0000 Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1xZO-004WTw-5g for linux-arm-kernel@lists.infradead.org; Thu, 16 Jun 2022 22:02:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655416950; x=1686952950; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=FTSAuZio06yo2Ofn9Nn8yskW+7vnLgH3CDz569XEMjg=; b=hGI6kdOhw4QtM1uyg8nGhjrR8km3AxJEx1zui3v61ZgQddkSkWPhu6yt QTTyuOYLRL3afnMV7QRPEV9BvZtQqJWr92ImpkVt/4ZfbPytKeo+i5H/4 xbxqs8LcTP/aqk30lkq/ts0RzFhgwaJy+NVDHNoK9pV2dgZ75kOUp+k0z apLT7TzTJV4qEDgW0A1rWXoMTC9ZdKgcOOfpFta6Dr9/xdMWHOs4rjVhi mGaJX6Q49SCEOMftqVIeX+jPpCo/SLsG6QTfUkII06TFr5jROVMix10Jz mDdt55EOgcqe5t93nXH5rk95GF21or+GL97DkZysrvHdpuw6HRqI7o1xi g==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="279419616" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="279419616" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2022 15:00:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="583799914" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 16 Jun 2022 15:00:20 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id EF431109; Fri, 17 Jun 2022 01:00:24 +0300 (EEST) From: Andy Shevchenko To: linux-iio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen , Maxime Coquelin , Alexandre Torgue , Andy Shevchenko Subject: [PATCH v1 1/1] iio: dac: stm32-dac: Replace open coded str_enable_disable() Date: Fri, 17 Jun 2022 01:00:23 +0300 Message-Id: <20220616220023.9894-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220616_150230_285246_02A99181 X-CRM114-Status: GOOD ( 10.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Replace open coded str_enable_disable() in error message in stm32_dac_set_enable_state(). Signed-off-by: Andy Shevchenko --- drivers/iio/dac/stm32-dac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/dac/stm32-dac.c b/drivers/iio/dac/stm32-dac.c index e842c15c674d..315d66648210 100644 --- a/drivers/iio/dac/stm32-dac.c +++ b/drivers/iio/dac/stm32-dac.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "stm32-dac-core.h" @@ -79,8 +80,7 @@ static int stm32_dac_set_enable_state(struct iio_dev *indio_dev, int ch, ret = regmap_update_bits(dac->common->regmap, STM32_DAC_CR, msk, en); mutex_unlock(&dac->lock); if (ret < 0) { - dev_err(&indio_dev->dev, "%s failed\n", en ? - "Enable" : "Disable"); + dev_err(&indio_dev->dev, "%s failed\n", str_enable_disable(en)); goto err_put_pm; } -- 2.35.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel