Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp408856pxf; Thu, 8 Apr 2021 05:48:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyogk+Ebh00e5X192JHAXFwwMhEzK6LSfNqBBhxqKw6GtvW0+5/BVJyKsNwQMH8r+dfJaYG X-Received: by 2002:a05:6a00:856:b029:208:f11c:231f with SMTP id q22-20020a056a000856b0290208f11c231fmr7166508pfk.25.1617886116205; Thu, 08 Apr 2021 05:48:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617886116; cv=none; d=google.com; s=arc-20160816; b=lgiUb8CGk7pHTdlzNeo9NSnHLR0EgXe1kWNiTsY0yGUie/Sd9lYkYhWHW6KLWlJUm9 xJ0THkMZLt4fKU4vP933oJQf4ca74AnRzdnCprbpC7i0FX6Rcr44qvNxUG+/FTNMiYtQ LeLmwLYN4YapoYBIoDW+irmm3DOKV48RkQTC+tzZ/SfY34a3VrSuA/krUEmSN/Hf+sRJ Tm4m6u1OkIW9S1xiqx0AvyPaFropDlSRdZogjOEpeVyapyF33Qp1Vv4UQa84dh9hgHeg 3IT4nRYW2wtInENGw2DXP045+A/g7EkCb27Q7M4qhcRC98W+uibHFutzjv0wygCwzKNi xEYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=mwvAgYtumxrI/+egX4QqPi8wjvGMgp/K9KzOEsokL9E=; b=t6ryUG7wZ36b6T+UMhxs9ZDDxV7Cqbc6RBms5NaBeJyulFNOdNFd049sfeahSXs8DP w72b4QH0Y0g02JxOdBKLrJQIH6qdKyGe8hHYf/bfr4ilUT1z+jSJc7KgijL6lWpeswG2 mtpvVQcx6O7bSy1qb2fiMFV441S55AlYkPWj3n+VNWmdssXAW9kd8sgygJm3DFswOZSi Sw5OtEBBS/vxFiKZd+e59INObYOf2/Ry6XtU4Qopt6sux7hhJ7UVpMU+yy2UpwsOssn/ DzZoyh1ruGmbSh0BnDCZR6rLcMgNCGWiENyxboLU/DCywzHNd9Kwa65q6WelWJ7jCAwe bG9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x188si19326832pgx.47.2021.04.08.05.48.24; Thu, 08 Apr 2021 05:48:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231158AbhDHMrs (ORCPT + 99 others); Thu, 8 Apr 2021 08:47:48 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:16049 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbhDHMrn (ORCPT ); Thu, 8 Apr 2021 08:47:43 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FGLZ31d7zzNttM; Thu, 8 Apr 2021 20:44:43 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.498.0; Thu, 8 Apr 2021 20:47:19 +0800 From: Chen Huang To: Anton Yakovlev , "Michael S . Tsirkin" , Jaroslav Kysela , Takashi Iwai CC: , , , , Chen Huang Subject: [PATCH -next] ALSA: virtio: use module_virtio_driver() to simplify the code Date: Thu, 8 Apr 2021 12:54:29 +0000 Message-ID: <20210408125429.1158703-1-chenhuang5@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.112.125] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org module_virtio_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Chen Huang --- sound/virtio/virtio_card.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sound/virtio/virtio_card.c b/sound/virtio/virtio_card.c index ae9128063917..150ab3e37013 100644 --- a/sound/virtio/virtio_card.c +++ b/sound/virtio/virtio_card.c @@ -432,17 +432,7 @@ static struct virtio_driver virtsnd_driver = { #endif }; -static int __init init(void) -{ - return register_virtio_driver(&virtsnd_driver); -} -module_init(init); - -static void __exit fini(void) -{ - unregister_virtio_driver(&virtsnd_driver); -} -module_exit(fini); +module_virtio_driver(virtsnd_driver); MODULE_DEVICE_TABLE(virtio, id_table); MODULE_DESCRIPTION("Virtio sound card driver"); -- 2.17.1