From patchwork Thu Jul 16 19:22:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 6810651 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 479CF9F2E8 for ; Thu, 16 Jul 2015 19:23:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64D022068D for ; Thu, 16 Jul 2015 19:23:41 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 2CA212061E for ; Thu, 16 Jul 2015 19:23:40 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 45DE126669E; Thu, 16 Jul 2015 21:23:39 +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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id ABF852605EA; Thu, 16 Jul 2015 21:23:08 +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 AE5342605D3; Thu, 16 Jul 2015 21:23:05 +0200 (CEST) Received: from smtp-out-036.synserver.de (smtp-out-036.synserver.de [212.40.185.36]) by alsa0.perex.cz (Postfix) with ESMTP id 86B912605B8 for ; Thu, 16 Jul 2015 21:22:58 +0200 (CEST) Received: (qmail 31219 invoked by uid 0); 16 Jul 2015 19:22:58 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 31047 Received: from p5b39d344.dip0.t-ipconnect.de (HELO lars-laptop.localdomain) [91.57.211.68] by 217.119.54.87 with SMTP; 16 Jul 2015 19:22:58 -0000 From: Lars-Peter Clausen To: Mark Brown , Liam Girdwood Date: Thu, 16 Jul 2015 21:22:50 +0200 Message-Id: <1437074572-3831-2-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1437074572-3831-1-git-send-email-lars@metafoo.de> References: <1437074572-3831-1-git-send-email-lars@metafoo.de> Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen Subject: [alsa-devel] [PATCH 2/4] ASoC: max9877: Convert to component 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The driver does not use any CODEC specific constructs anymore. Convert it to snd_soc_component. Signed-off-by: Lars-Peter Clausen --- sound/soc/codecs/max9877.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/sound/soc/codecs/max9877.c b/sound/soc/codecs/max9877.c index b469e1c..fb448dd 100644 --- a/sound/soc/codecs/max9877.c +++ b/sound/soc/codecs/max9877.c @@ -121,7 +121,7 @@ static const struct snd_soc_dapm_route max9877_dapm_routes[] = { { "HPR", NULL, "SHDN" }, }; -static const struct snd_soc_codec_driver max9877_codec = { +static const struct snd_soc_component_driver max9877_component_driver = { .controls = max9877_controls, .num_controls = ARRAY_SIZE(max9877_controls), @@ -154,14 +154,8 @@ static int max9877_i2c_probe(struct i2c_client *client, for (i = 0; i < ARRAY_SIZE(max9877_regs); i++) regmap_write(regmap, max9877_regs[i].reg, max9877_regs[i].def); - return snd_soc_register_codec(&client->dev, &max9877_codec, NULL, 0); -} - -static int max9877_i2c_remove(struct i2c_client *client) -{ - snd_soc_unregister_codec(&client->dev); - - return 0; + return devm_snd_soc_register_component(&client->dev, + &max9877_component_driver, NULL, 0); } static const struct i2c_device_id max9877_i2c_id[] = { @@ -175,7 +169,6 @@ static struct i2c_driver max9877_i2c_driver = { .name = "max9877", }, .probe = max9877_i2c_probe, - .remove = max9877_i2c_remove, .id_table = max9877_i2c_id, };