From patchwork Fri Jun 11 07:52:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dingsenjie@163.com X-Patchwork-Id: 1491973 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-fsi-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=VGNo25da; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G3wVF0RSQz9sW8 for ; Tue, 15 Jun 2021 14:35:33 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4G3wVF4mftz303J for ; Tue, 15 Jun 2021 14:35:33 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=VGNo25da; dkim-atps=neutral X-Original-To: linux-fsi@lists.ozlabs.org Delivered-To: linux-fsi@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=163.com (client-ip=220.181.12.14; helo=m12-14.163.com; envelope-from=dingsenjie@163.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=VGNo25da; dkim-atps=neutral Received: from m12-14.163.com (m12-14.163.com [220.181.12.14]) by lists.ozlabs.org (Postfix) with ESMTP id 4G1YRR6tPLz308m for ; Fri, 11 Jun 2021 18:09:53 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=PAQZt YbOUKIUtGF0tVsvHsRvw4/iH/MayKKZuzkWlLI=; b=VGNo25daxYDACzdMh2Xq6 HX9fvEuMhEk/H3wy6sYTCESy4UeX0JAu679inFT8SDZYGv+m9rCi0rJB2T+JGNML 25WcJ63QFFsTZ95kYK/TEEwZeqwSjH71dLe9TV/+Lw/Tm0vU6n5STG+1LIGGlPDg hHonWlv2eGNIXq3Nua+WsE= Received: from COOL-20201222LC.ccdomain.com (unknown [218.94.48.178]) by smtp10 (Coremail) with SMTP id DsCowAB3L21zFsNgwfyzOA--.22392S2; Fri, 11 Jun 2021 15:53:26 +0800 (CST) From: dingsenjie@163.com To: jk@ozlabs.org, joel@jms.id.au, alistair@popple.id.au, eajames@linux.ibm.com Subject: [PATCH] fsi: fsi-scom: Use module_fsi_driver to simplify the code Date: Fri, 11 Jun 2021 15:52:36 +0800 Message-Id: <20210611075236.59788-1-dingsenjie@163.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 X-CM-TRANSID: DsCowAB3L21zFsNgwfyzOA--.22392S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrZw47Ar1xKw13CF1xtw47Arb_yoW3AFX_Ca 48Z3ZrGr4UWFy7C34Dtw4YvryF9Fy5WFs3ZF4jqFZxKwnrZw1rAr1q9FW7XF4UWr4UAFWk A34xZF1ftr18JjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU0m9aDUUUUU== X-Originating-IP: [218.94.48.178] X-CM-SenderInfo: 5glqw25hqmxvi6rwjhhfrp/1tbiZRauyF8ZPFl4iQAAsH X-Mailman-Approved-At: Tue, 15 Jun 2021 14:35:30 +1000 X-BeenThere: linux-fsi@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dingsenjie , linux-kernel@vger.kernel.org, linux-fsi@lists.ozlabs.org Errors-To: linux-fsi-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "linux-fsi" From: dingsenjie Simplify the code by using module_fsi_driver macro. Signed-off-by: dingsenjie --- drivers/fsi/fsi-scom.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/fsi/fsi-scom.c b/drivers/fsi/fsi-scom.c index b45bfab..91bb413 100644 --- a/drivers/fsi/fsi-scom.c +++ b/drivers/fsi/fsi-scom.c @@ -645,16 +645,5 @@ static int scom_remove(struct device *dev) } }; -static int scom_init(void) -{ - return fsi_driver_register(&scom_drv); -} - -static void scom_exit(void) -{ - fsi_driver_unregister(&scom_drv); -} - -module_init(scom_init); -module_exit(scom_exit); +module_fsi_driver(scom_drv); MODULE_LICENSE("GPL");