From patchwork Tue Dec 3 10:04:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 21946 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7C7A9202DA for ; Tue, 3 Dec 2013 10:04:42 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id oy12sf34014430veb.1 for ; Tue, 03 Dec 2013 02:04:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=M9keiKVyMGGU3radH74C1F8r+hQCnGzu5lcoFmPfHZ4=; b=XaNWIgFSCRT/Uru9zhHqDg3Y9F210VprXNF6xiAuwKQhUHKNCYnXVIWmdIXsYhS1gR QW5eF5rYDOpaF/kE8ALb0lSEcUvjuYFOpZw5VK4fDqNCds1Z858yVljE760itTFUuL9e u9CBdJybvhQhrP1pUklcN/8WR1cIKqnhBcOsL0xTNX2N934ycwWadASvjcQUk33uhqnZ ZD8MHXME6nVRb2Ksi1EOZ3mkVSWz3dD0SnsvJuNdr1HONDFtWEpxspfHanuDedj2C0KW s2T6OhCKJdGW4P0nS4/nJrcC1IG9+V1USALeMlrEDwLqUFcOUVxNqnsnOPvlUAW2YcSK EAsQ== X-Gm-Message-State: ALoCoQlxRo+A/bphsyIRWP35FS+p/MvcbUbjkfmaMIkI2TXzqyaQT5ligEsvZ1MrpjLx0mjgGg3Y X-Received: by 10.224.55.81 with SMTP id t17mr20409906qag.3.1386065081948; Tue, 03 Dec 2013 02:04:41 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.127.46 with SMTP id nd14ls5300221qeb.19.gmail; Tue, 03 Dec 2013 02:04:41 -0800 (PST) X-Received: by 10.58.11.73 with SMTP id o9mr55254763veb.8.1386065081849; Tue, 03 Dec 2013 02:04:41 -0800 (PST) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id sl9si16239212vdc.34.2013.12.03.02.04.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 02:04:41 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id ik5so9510117vcb.16 for ; Tue, 03 Dec 2013 02:04:41 -0800 (PST) X-Received: by 10.58.255.233 with SMTP id at9mr5369430ved.20.1386065081658; Tue, 03 Dec 2013 02:04:41 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp194625vcz; Tue, 3 Dec 2013 02:04:41 -0800 (PST) X-Received: by 10.152.204.39 with SMTP id kv7mr1672166lac.42.1386065080749; Tue, 03 Dec 2013 02:04:40 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com [209.85.215.53]) by mx.google.com with ESMTPS id jb7si3505325lbc.158.2013.12.03.02.04.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 02:04:40 -0800 (PST) Received-SPF: neutral (google.com: 209.85.215.53 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id ea20so8809604lab.40 for ; Tue, 03 Dec 2013 02:04:40 -0800 (PST) X-Received: by 10.112.180.167 with SMTP id dp7mr534146lbc.43.1386065080158; Tue, 03 Dec 2013 02:04:40 -0800 (PST) Received: from linaro-ulf.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id i8sm35583394lbh.2.2013.12.03.02.04.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 02:04:39 -0800 (PST) From: Ulf Hansson To: Russell King , linux-arm-kernel@lists.infradead.org Cc: Ulf Hansson , Takashi Iwai , Jaroslav Kysela Subject: [PATCH 1/6] ALSA: AACI: Convert to modern PM ops Date: Tue, 3 Dec 2013 11:04:26 +0100 Message-Id: <1386065071-9529-2-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1386065071-9529-1-git-send-email-ulf.hansson@linaro.org> References: <1386065071-9529-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Even if the CONFIG_PM explicity is undefined, let's convert to the modern PM ops. Cc: Takashi Iwai Cc: Jaroslav Kysela Signed-off-by: Ulf Hansson --- sound/arm/aaci.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 1ca8dc2..c421fdb 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -753,7 +753,7 @@ static struct snd_pcm_ops aaci_capture_ops = { * Power Management. */ #ifdef CONFIG_PM -static int aaci_do_suspend(struct snd_card *card, unsigned int state) +static int aaci_do_suspend(struct snd_card *card) { struct aaci *aaci = card->private_data; snd_power_change_state(card, SNDRV_CTL_POWER_D3cold); @@ -761,28 +761,28 @@ static int aaci_do_suspend(struct snd_card *card, unsigned int state) return 0; } -static int aaci_do_resume(struct snd_card *card, unsigned int state) +static int aaci_do_resume(struct snd_card *card) { snd_power_change_state(card, SNDRV_CTL_POWER_D0); return 0; } -static int aaci_suspend(struct amba_device *dev, pm_message_t state) +static int aaci_suspend(struct device *dev) { - struct snd_card *card = amba_get_drvdata(dev); + struct snd_card *card = dev_get_drvdata(dev); return card ? aaci_do_suspend(card) : 0; } -static int aaci_resume(struct amba_device *dev) +static int aaci_resume(struct device *dev) { - struct snd_card *card = amba_get_drvdata(dev); + struct snd_card *card = dev_get_drvdata(dev); return card ? aaci_do_resume(card) : 0; } + +static SIMPLE_DEV_PM_OPS(aaci_dev_pm_ops, aaci_suspend, aaci_resume); +#define AACI_DEV_PM_OPS (&aaci_dev_pm_ops) #else -#define aaci_do_suspend NULL -#define aaci_do_resume NULL -#define aaci_suspend NULL -#define aaci_resume NULL +#define AACI_DEV_PM_OPS NULL #endif @@ -1100,11 +1100,10 @@ MODULE_DEVICE_TABLE(amba, aaci_ids); static struct amba_driver aaci_driver = { .drv = { .name = DRIVER_NAME, + .pm = AACI_DEV_PM_OPS, }, .probe = aaci_probe, .remove = aaci_remove, - .suspend = aaci_suspend, - .resume = aaci_resume, .id_table = aaci_ids, };