From patchwork Mon Nov 20 07:27:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 119258 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3506351qgn; Sun, 19 Nov 2017 23:28:30 -0800 (PST) X-Google-Smtp-Source: AGs4zMafxPOQOxy2YKs9ag9ykaxXXkHemwWJQmcj+vee210XEaROF9/oTlSTVNRzAUe6p+CCIos8 X-Received: by 10.159.218.140 with SMTP id w12mr7567660plp.162.1511162910231; Sun, 19 Nov 2017 23:28:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511162910; cv=none; d=google.com; s=arc-20160816; b=qIrDkd6Ft0WLDqBEALM7M/jElsVTQyi0ORx6FNw8rAjuD8zf23rx2A3nsTviSSimtR xUkCB1enz8yZqw8kHLmgL7R2GqDI33a0r4s/f8DllQmlml8l/d2l+35KoUQDjBa1dqLm 0Px3nNU8dWD0p3ykPs2tyNNW+i793UPXx/NibohyL14NBIPSMBr+MiiAL8ZNhoN0BECy DH9Vd4NND+KA/3k4yWcNZkaDC35TyfuR/i6/uHy0EeefoZ5VoQARF5MobsMbL3B9Fpm2 M3XF+aQGsdu54r7PuhJjzgMCNXONfq6lfadZW6OEX8LcX0JrVk1+LIgZfobt6lU61lkM 5L6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=A4xb9CcLAAcVaGmXD/falaMTzbnCh8QR3CgNCzGL85k=; b=ZgoH6e0QNFR/Gl15epQD8RPyiS5dKlXR5K8niSZENrAeRx4ERW42wiJVF6IA7+aPzm K3DP0GF1JUus+8fpswilzDFBXz7uMrQAgq3TW5BoTnogpWzncfQIili9iWgQ/AYNCfOF 476tmW8fZsFCU+gfdTJvEAPIWym6jw+ApYA6R/VY0ps1YhnCdH4Yd8ZdQTEzZzXTUgI5 vEevG9DmftIhaS6/bgHy1CS+64xywLmREPmKA0qVUbeYBR2qN14jBwmeRsrODSoUnJ2W iDoedwKxrAb+MzeF2CQPosdo7SBUvI6iu0FIDh7kApCL28Zjn/bvD9FehwmZ/LKLtQHf +ObA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j83DCcrm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si937539pld.816.2017.11.19.23.28.30; Sun, 19 Nov 2017 23:28:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j83DCcrm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751075AbdKTH2S (ORCPT + 11 others); Mon, 20 Nov 2017 02:28:18 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:38569 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750795AbdKTH2R (ORCPT ); Mon, 20 Nov 2017 02:28:17 -0500 Received: by mail-pg0-f67.google.com with SMTP id s11so6679449pgc.5 for ; Sun, 19 Nov 2017 23:28:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=A4xb9CcLAAcVaGmXD/falaMTzbnCh8QR3CgNCzGL85k=; b=j83DCcrmJbyIBgf7cgZKpCh5Xx7e/drLLFiCbYvsVhIclkI9yHfLl9b258CLej++rQ xJkzHVkQXjZPjraHpvwRzfrLXRy5tPR+Eq+THFu+MI9XObITrmy1kdM+fP3novCDL3ZU Hgzf4KGmVQuWuKUtjhf+oEpTUVb2h7ny0X0qM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=A4xb9CcLAAcVaGmXD/falaMTzbnCh8QR3CgNCzGL85k=; b=dZg3aXXoLHGk3Er38D3WBfKWgncscG8KTNU61bDR+ri8pPgB58KouWFTEtNgN4SV/t 5lt52AK5lZCIHSc8DJodgHzbhz3H0TMHeK/gZQpy+FoqKkB0CNd8ynwwkStySTKieEgt sZbixDlR9Vf2Wi2bwKl5G/pIepC2iDGWgN4GJihY3DSH5cljxJf4CC53SLILKtoIN67L AscK8asVJT5VF5thhIqVwlbJoyQd7h3A1PsrHvNuqjUg02G9olOomItyEhLCFmDrGI0z RyqQlnxThD18KuYLTVmxWbMzlqkxUGHCNTMqFFKlJcAIGjqDHT3hyRoML3eEb2rc00cw equw== X-Gm-Message-State: AJaThX7ZtPGCZtz1C1hfA0hRtddsjO0bGiz4Gv9Lan45O57YWJ4kLX7a YQxo7c/tmcUWaxE8DpO7Rx1FPA== X-Received: by 10.84.137.129 with SMTP id 1mr13070932pln.67.1511162896880; Sun, 19 Nov 2017 23:28:16 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id l5sm21832093pfi.165.2017.11.19.23.28.02 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 19 Nov 2017 23:28:16 -0800 (PST) From: Baolin Wang To: broonie@kernel.org, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, baolin.wang@linaro.org Subject: [PATCH] regmap: Remove the redundant config to select hwspinlock Date: Mon, 20 Nov 2017 15:27:28 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The hwspinlock was changed to a bool by commit d048236dfdfe ("hwspinlock: Change hwspinlock to a bool"), so we do not need the REGMAP_HWSPINLOCK config to select hwspinlock or not. Signed-off-by: Baolin Wang --- drivers/base/regmap/Kconfig | 4 ---- drivers/base/regmap/regmap.c | 11 ++--------- 2 files changed, 2 insertions(+), 13 deletions(-) -- 1.9.1 diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig index 3a1535d..0368fd7 100644 --- a/drivers/base/regmap/Kconfig +++ b/drivers/base/regmap/Kconfig @@ -6,7 +6,6 @@ config REGMAP default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ) select IRQ_DOMAIN if REGMAP_IRQ - select REGMAP_HWSPINLOCK if HWSPINLOCK=y bool config REGCACHE_COMPRESSED @@ -38,6 +37,3 @@ config REGMAP_MMIO config REGMAP_IRQ bool - -config REGMAP_HWSPINLOCK - bool diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 8d516a9..f25ab18 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -414,7 +414,6 @@ static unsigned int regmap_parse_64_native(const void *buf) } #endif -#ifdef REGMAP_HWSPINLOCK static void regmap_lock_hwlock(void *__map) { struct regmap *map = __map; @@ -457,7 +456,6 @@ static void regmap_unlock_hwlock_irqrestore(void *__map) hwspin_unlock_irqrestore(map->hwlock, &map->spinlock_flags); } -#endif static void regmap_lock_mutex(void *__map) { @@ -674,7 +672,6 @@ struct regmap *__regmap_init(struct device *dev, map->unlock = config->unlock; map->lock_arg = config->lock_arg; } else if (config->hwlock_id) { -#ifdef REGMAP_HWSPINLOCK map->hwlock = hwspin_lock_request_specific(config->hwlock_id); if (!map->hwlock) { ret = -ENXIO; @@ -697,10 +694,6 @@ struct regmap *__regmap_init(struct device *dev, } map->lock_arg = map; -#else - ret = -EINVAL; - goto err_map; -#endif } else { if ((bus && bus->fast_io) || config->fast_io) { @@ -1116,7 +1109,7 @@ struct regmap *__regmap_init(struct device *dev, regmap_range_exit(map); kfree(map->work_buf); err_hwlock: - if (IS_ENABLED(REGMAP_HWSPINLOCK) && map->hwlock) + if (map->hwlock) hwspin_lock_free(map->hwlock); err_map: kfree(map); @@ -1305,7 +1298,7 @@ void regmap_exit(struct regmap *map) kfree(async->work_buf); kfree(async); } - if (IS_ENABLED(REGMAP_HWSPINLOCK) && map->hwlock) + if (map->hwlock) hwspin_lock_free(map->hwlock); kfree(map); }