From patchwork Sat Aug 1 02:03:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 6921581 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BDD5C9F38B for ; Sat, 1 Aug 2015 02:04:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EF0032057E for ; Sat, 1 Aug 2015 02:04:08 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 979FA2054B for ; Sat, 1 Aug 2015 02:04:07 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4D258261B01; Sat, 1 Aug 2015 04:04:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 5F200261600; Sat, 1 Aug 2015 04:03:58 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 43636261703; Sat, 1 Aug 2015 04:03:57 +0200 (CEST) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by alsa0.perex.cz (Postfix) with ESMTP id 1074B2615FC for ; Sat, 1 Aug 2015 04:03:50 +0200 (CEST) Received: by pachj5 with SMTP id hj5so49331326pac.3 for ; Fri, 31 Jul 2015 19:03:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=2M+rnI32nF0EMyNDQylI+RhRI/vwFPAYGbo2aYaGMd0=; b=ha7C1SmDhi/s0gI5TXWuhcgPwnC3Ksdz5iUvs9TKMkgFRPwLJmUlQHLT9NjFcpL92O UnhO5excnK3gPC3ELkZBV/fbqxGgGqEXXwjGIMg+2Hg6aeF9hURyUnFpzByF63IcJarp tNX37hqf3e4DrzNw5FNeKJW9JVZkl3SxVDFimOCVq68Jb7Y1+BaeDlL87hI1VVM4Cqz9 mHp927MJQdiVMHK7AFBpCzcteZrIMp1VeGY22yNWY9yPlmFkel1q4bE3C3FZpy9bmFyU LidUaFerDF5/ab4nvEf10oD3RQvS4uKNdYU+Dl5TiVF4T1jJLxhC3RPoCUBLtFnAorYj Cqwg== X-Gm-Message-State: ALoCoQmT1RGKYcALKCtEBT9PO983hsMZqj3yUlVKdJnEsKA2Wer4pqtBDBfWvYFi6qgPdFh4t0mf X-Received: by 10.68.238.231 with SMTP id vn7mr1439592pbc.38.1438394628586; Fri, 31 Jul 2015 19:03:48 -0700 (PDT) Received: from phoenix.local (36-239-222-188.dynamic-ip.hinet.net. [36.239.222.188]) by smtp.gmail.com with ESMTPSA id wg1sm238987pbc.7.2015.07.31.19.03.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 19:03:47 -0700 (PDT) Message-ID: <1438394622.6442.1.camel@ingics.com> From: Axel Lin To: Mark Brown Date: Sat, 01 Aug 2015 10:03:42 +0800 X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Cc: Charles Keepax , patches@opensource.wolfsonmicro.com, Liam Girdwood , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 1/2] ASoC: wm8731: Drop wm8731_writeable function X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP When .max_register is set and .writeable_reg is not implement, registers between 0 and .max_register are writeable. This is the same as current implementation of wm8731_writeable(), so just drop implementation for .writeable_reg callback. Signed-off-by: Axel Lin Acked-by: Charles Keepax --- sound/soc/codecs/wm8731.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index c862232..ace8645 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c @@ -79,11 +79,6 @@ static bool wm8731_volatile(struct device *dev, unsigned int reg) return reg == WM8731_RESET; } -static bool wm8731_writeable(struct device *dev, unsigned int reg) -{ - return reg <= WM8731_RESET; -} - #define wm8731_reset(m) regmap_write(m, WM8731_RESET, 0) static const char *wm8731_input_select[] = {"Line In", "Mic"}; @@ -655,7 +650,6 @@ static const struct regmap_config wm8731_regmap = { .max_register = WM8731_RESET, .volatile_reg = wm8731_volatile, - .writeable_reg = wm8731_writeable, .cache_type = REGCACHE_RBTREE, .reg_defaults = wm8731_reg_defaults,