From patchwork Fri Jan 6 15:13:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dawei Li X-Patchwork-Id: 13091428 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 239D1C3DA7A for ; Fri, 6 Jan 2023 15:15:52 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 74CB514709; Fri, 6 Jan 2023 16:15:00 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 74CB514709 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1673018150; bh=R472oq0tGvf1ZMxQtpuKciYr1fUPVI3tRAJV7uFDmJI=; h=From:To:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=RM0s+3Wf3L217v7Ciu2oCowKK5vMw9JmE6VKFjkCFE1Cs7VoKKN4BtA2yMsXrxglf SRQVoxoIkY2G92LBc9aquDVkg0CliwwzhogvRKXl/VnAIjPNpD5pbXpGsoW6K7lrGF YdnKGMdqxZ5Dxlik2MFhJuXIGRgHKI3h/ISqVTg4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 30F32F80238; Fri, 6 Jan 2023 16:15:00 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D62B0F80238; Fri, 6 Jan 2023 16:14:58 +0100 (CET) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01olkn2032.outbound.protection.outlook.com [40.92.98.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2DFCAF80238 for ; Fri, 6 Jan 2023 16:14:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2DFCAF80238 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=outlook.com header.i=@outlook.com header.a=rsa-sha256 header.s=selector1 header.b=qI/l1XLt ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GXjIVyeYTeaklJUI9FGZbPSJY6UI5Oi4ZJv70lOQ0dTLnw+ovKibiLpEXMqI5JyM3TbOvDrWcxYee5fScgModKMmIfw8Hpx+ZAzWN8nk3yP7ZhTcMEvn8oB0m6pMVtKU1U/9xGrNP9ksEKnn/QmZkQCcwRcH9sT5tXv62wXjvXpGJRqYbF8Od++PUtuEQLj5mE2BQbU+Ii+6cm6RRhDRaRyCXoXGZ1IBZ08Lhct5b96sEPvyuAuQou/dsExa1T5JrIFmlc016n4Udf5d2eSSgOHJjJPT0Kctv+ecf9wIKrPB3qtsqia1E8+mOKB0ymUFv8IJ7TKVpw1ps5evUIIZbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LZyinIY6P3e7c7+/GT7rnKK06YMeQErfch6qNK8tu8Q=; b=EmhGVtPon8jLMU3kdvrz//qe67FOKm6dbSanNnVldLo/w5OUaMkHZnTOzinJdhWLNgTfpMuqU9Clq5ckotUARmYBkO0IJK0vLl60Yle7Gp3HfoVS3ijqzMRrcRlVg30Qqk0KufR9b/K8ftyIoLZ4Kfc4ifu6/N0/YJKP02vBpfxxoMMActZ3lOeNjwbb+GWDK9YFlG8M88rCZUUBGTaZDCHwRmLBh7/zLOHb8AO2VweNGbdmmhvypomIIwwRj4osEz4o96ijRTJy2ynnY1LYPnykMpFGWTCs5ysrZS++hY92/U6r2/19xml4pH9yA30igrLXwP/vyjuFz+wp4fHoRw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LZyinIY6P3e7c7+/GT7rnKK06YMeQErfch6qNK8tu8Q=; b=qI/l1XLtFPJrpbh4MnwnC3cMI7UsUQwS6m89MDOhiKZaCZgh3PvB7huquSj5XjpVblziM2AOnE9I3nxn30g1DjGOAFB2Qx2ctdhnkkNYsTvBdtas9LAs369HJ2nk2xGSgfrs0Sh86g3xQU2tsIJiVHrZHmwm8JLxfJKwSp2xDxTSfGM0Z+luuPYkp0m6jWaj0Q+GrED7jmsy99+bLw5s8OM6VpTUNys2yLiO89sLbA99I97htkkcInMmNu0mt4Dq2CAG47FFCcSEg6beWa0e9b2lxvm4TzeqyRSZ9kFzH9kJVnRN8SCjWIFYGrHjXDbaYWvNmst1cMQtBC/zMb+Nxw== Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) by OSZP286MB2411.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:15e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Fri, 6 Jan 2023 15:14:49 +0000 Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605]) by TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605%4]) with mapi id 15.20.5944.019; Fri, 6 Jan 2023 15:14:49 +0000 From: Dawei Li To: perex@perex.cz, tiwai@suse.com Subject: [PATCH v2] ALSA: ac97: make remove callback of ac97 driver void returned Date: Fri, 6 Jan 2023 23:13:49 +0800 Message-ID: X-Mailer: git-send-email 2.25.1 X-TMN: [XHa1wxZfbOIGG+aMij2sS61NNMVt0io+] X-ClientProxiedBy: TYCP286CA0125.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b6::7) To TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) X-Microsoft-Original-Message-ID: <20230106151349.27702-1-set_pte_at@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCP286MB2323:EE_|OSZP286MB2411:EE_ X-MS-Office365-Filtering-Correlation-Id: f239cf0d-2a06-45db-360b-08daeff8c095 X-MS-Exchange-SLBlob-MailProps: ymJijV9pwJnUONNRvQZ2/TrCTdctBj73VVlaYy1TRJ0J4JrwBWfHpVv01sRojAH1CmBSWp/OLMGhISjA5W5f+BBxKMlZQkkLTKLmvCREfXzAEqc55fnz8pfm1RPYridcY7dTsxdbKqkITF9n0lkussyLH6rX1m5NvZdZJYArKUUTVso4zIq+Mio2MFGW5volxe070GYltVA5GK2d/TRCbg1E2F9GPOCzdVl4gUo5CEfEbi3b0GBdxynT/7zTl0NabjvPqi2/qw7EwmBWmTM297R/1Jmqo9+OFghLnD/G3kMyZHMFmRmggSZyZPp+jMYurzuoFPpWdiC371/q9/G3kZ4t93aGDenwty+euvylwRat/heuWAVkUW6XhWWr/80JDEfr08Il110SyMoUKSSwdZ/NMfwnc/JhQ65Z7uZWPwFR2aAgRfdfT6JoYl1Ck6sBympJ7yhC0j1bcdwFgCrhnn0Ev23gKN72S9o7kuxfQQ2HrHb4LCo/I6F+QYvCM9dotWtLFtHHS1MlxuDrWTzVWaZFikcBJlEE91MI2p/tTE96FASd2tvLXP/7ZcyG006dQ2uV87Xa3UfZR6wNNNqjdk3R8t8gkXtKTyeimudIAgTylVfx2EXEWiUV6jmZT2a/u2SoUVA2D3q0kW1ivY5TEv74Axmvd1LSRKbIX7dKfeM/SWFeS/8iSIa8Io0eTQVbQzhTPNtQ/sJw4z83DW9kQ+phFXHIOdqWKbLgxmt7hzovV7ChItytH7W/yFHs8RC/dSNZDKbWhpKeNaqIrCZt5KI9e/vm84KFiCjuXM3B+d4bKdam8sdW6cZtXRIud9+y X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5MWo6scNi8warzM5nCk5DqTTFdPRjfPhMbcQ4xSFf4gtKDHJ4CzM9+l/3QH6OiMyvATDBvwR2Fpww56VV9lcfGqBnUD9TNv4/CM78wH1nQjb5T6L1JlAjH61GaU7nursytzL3M0ycMZr493JHUpUULGmjapCAoyNYGK69wa51U7SxRLy78mrDxijPcs/EZvMTobDXxXoIvlROH69r6SZhns0HFF6PzqGmp42JGpsUHQxTl1OfNiHvD8P6TcQBix3FCQTZx4kPHO8bkFNHXwnn+Hy3ksBS+i+NON42jukWxP8ZeepXrGWVts+wJkdz3fc0cBWuagoxf97V1Ht4xGza+8x3PbaY7m1XkpuoiFkZb0fsrqPtJHgXxCU6GGX2nfYhxCkjB8jRc+UR9GYscyeT4b48q0nd+z2wmaEmsBTKNsE6703/olEnsuA+Pet/eqFox3CPiBYFeq9+AC2S4Kmg013jADthCAV6areXvXRKBe8ijG5XdU2cD3xjE21KjxDn8pScSPlm05xoArt9mi6KsbadQUwhrgEVeCwAZV7GsYMXqvO9NSSDK3VdXNq23aOUcWZcqTi+fhdAb6xkk5CKDL1RvVsF6MnEqq1zrZpq10pj8NMyOA3mZAfL1UsZkX34OxWv4YWvVOXckttCX3NCA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XEHr4cxtjpHnJW4Z/M3yfNhPtDK1w2WtkHWWSfW8nDD7X814qNXpWgUuSsLSKmuwpAN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RrYDlDwbZpdfm6sb5oPE/DasyImONQbZJEaTBNV/daBevAjfx7LAeVlKWuVpUFxplZxiJi4kY/WZ6PEde1d8kC6EAvqbcp/UsNzzk1nPwTxeCEN4Il3SEWD/l5McqHjVPQOfZr7TYt1TJbsALZ0qc6ixH7MNw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f239cf0d-2a06-45db-360b-08daeff8c095 X-MS-Exchange-CrossTenant-AuthSource: TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2023 15:14:49.1246 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZP286MB2411 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Dawei Li Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Since commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. As such, change the remove function for ac97 based drivers to return void. Signed-off-by: Dawei Li --- v1 -> v2 - Update commit message. - Rebased to latest sound/for-next. v1 - https://lore.kernel.org/all/TYCP286MB2323207367F2D39D0D725828CA189@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM/ --- drivers/mfd/wm97xx-core.c | 4 +--- include/sound/ac97/codec.h | 2 +- sound/ac97/bus.c | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/mfd/wm97xx-core.c b/drivers/mfd/wm97xx-core.c index 9a2331eb1bfa..663acbb1854c 100644 --- a/drivers/mfd/wm97xx-core.c +++ b/drivers/mfd/wm97xx-core.c @@ -319,13 +319,11 @@ static int wm97xx_ac97_probe(struct ac97_codec_device *adev) return ret; } -static int wm97xx_ac97_remove(struct ac97_codec_device *adev) +static void wm97xx_ac97_remove(struct ac97_codec_device *adev) { struct wm97xx_priv *wm97xx = ac97_get_drvdata(adev); snd_ac97_compat_release(wm97xx->ac97); - - return 0; } static const struct ac97_id wm97xx_ac97_ids[] = { diff --git a/include/sound/ac97/codec.h b/include/sound/ac97/codec.h index 9792d25fa369..2fc641cb1982 100644 --- a/include/sound/ac97/codec.h +++ b/include/sound/ac97/codec.h @@ -63,7 +63,7 @@ struct ac97_codec_device { struct ac97_codec_driver { struct device_driver driver; int (*probe)(struct ac97_codec_device *); - int (*remove)(struct ac97_codec_device *); + void (*remove)(struct ac97_codec_device *dev); void (*shutdown)(struct ac97_codec_device *); const struct ac97_id *id_table; }; diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c index 045330883a96..6067c04ce4c0 100644 --- a/sound/ac97/bus.c +++ b/sound/ac97/bus.c @@ -524,10 +524,9 @@ static void ac97_bus_remove(struct device *dev) if (ret < 0) return; - ret = adrv->remove(adev); + adrv->remove(adev); pm_runtime_put_noidle(dev); - if (ret == 0) - ac97_put_disable_clk(adev); + ac97_put_disable_clk(adev); pm_runtime_disable(dev); }