From patchwork Mon May 10 14:13:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12248309 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9DAFC43461 for ; Mon, 10 May 2021 14:25:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 884D7611BD for ; Mon, 10 May 2021 14:25:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232841AbhEJO0q (ORCPT ); Mon, 10 May 2021 10:26:46 -0400 Received: from mga04.intel.com ([192.55.52.120]:19196 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233430AbhEJOX5 (ORCPT ); Mon, 10 May 2021 10:23:57 -0400 IronPort-SDR: sBILr2agu6CkLeGn0N+ahXYPU4XyUkNhLWYaKdneBUJF7DA52x4hB0xtjDxrbe7i5+Vvx6PLHb H2RlUiMA9ELA== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="197219818" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="197219818" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 07:13:20 -0700 IronPort-SDR: 8q69t8T4cd7Pz9kBtIzR0hiOEIAY2sWWrQYiZe4Y7dO2oo7IIjibHqXevhGAWAxGCjIdDPX9+q 7Ealoa2ujhgA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="408365690" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 10 May 2021 07:13:18 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1492D142; Mon, 10 May 2021 17:13:38 +0300 (EEST) From: Andy Shevchenko To: Andrej Picej , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jean Delvare , Guenter Roeck , Andy Shevchenko Subject: [PATCH v1 1/1] hwmon: (lm70) Use SPI_MODE_X_MASK Date: Mon, 10 May 2021 17:13:31 +0300 Message-Id: <20210510141331.56736-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko --- drivers/hwmon/lm70.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c index 40eab3349904..cdf23a59a203 100644 --- a/drivers/hwmon/lm70.c +++ b/drivers/hwmon/lm70.c @@ -184,7 +184,7 @@ static int lm70_probe(struct spi_device *spi) /* signaling is SPI_MODE_0 */ - if (spi->mode & (SPI_CPOL | SPI_CPHA)) + if ((spi->mode & SPI_MODE_X_MASK) != SPI_MODE_0) return -EINVAL; /* NOTE: we assume 8-bit words, and convert to 16 bits manually */