Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1942128pxk; Sun, 13 Sep 2020 23:35:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdWe0e699WDFHDAcZSpAYYFWg0HlAVvyaq9N6jRkLIi30ADMlnuMtnce/srUVW+cwjVqsr X-Received: by 2002:a50:8523:: with SMTP id 32mr16332700edr.282.1600065356390; Sun, 13 Sep 2020 23:35:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600065356; cv=none; d=google.com; s=arc-20160816; b=jjkeRbh4TVQuYw5yH3pYZUA6Ry6DpfwfRudzRFvQgmo+/ZZ8IHI3npLc54MFK55oK8 OzM+aAsXlfZv//vH2yh73FXSj5Igu/dOKqBKCBW05gXR/XTZfnDx/EMVQ8IDNAgpDXiM pfVaimUj1yjY8RqMJkycQqDg3Qh1Vn1M6x7uHvq3S6rZFNq93NZ9Pe+I8G3KtaXFnjMn B5X28uJVyrvoPLuBGQUtmwhzSt5nKQgsjPSsOCb8ZSjlQl7FAcAYjEsJNmrEjltz7qXU Suqy6MsbD8qfMfCZWd96aIVW0Rs8LJwUtWcI1p7XlAW7k588GgRCezd2ddYnZ/ofdjAH CKsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=CreR7+p7qecSs2FG1d5a1IixLk4TK6+leIgdW4M7VK0=; b=hGj02e98hVBjlcIJqRyjQ100XiY9xr5XcGOtFyVu2lxJtq3DInjf7JWL8FX9qDkHv/ fSjvAM4x8guEQ5VPcoAnZeA+myV5hLgb5V1JmtGQNyPVK3jELRX35AJcuZd0WMp04rYo pwcLVn8MQo6nKSX+QorAsxwsIDxE1UNzz+XkD3x7dg2PJfyv3eG4r3zxC7LCbIUDdpzB vT0lVVYq8wej9/f982KTh1qRt365egPsOmqTYAzx7IIS2Gdy0pIgNITuP7Pkk6qY+EX9 aHzIY4pZxNWVj5VSKdDYludVc0tcvXLk/Aw7sTv8akakzLeoSetQb22ITvh4fH367cKh D5yw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c61si6819655edf.394.2020.09.13.23.35.34; Sun, 13 Sep 2020 23:35:56 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726135AbgINGcH (ORCPT + 99 others); Mon, 14 Sep 2020 02:32:07 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:12248 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726075AbgINGbb (ORCPT ); Mon, 14 Sep 2020 02:31:31 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id A6F764523210BD948D6E; Mon, 14 Sep 2020 14:31:29 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Mon, 14 Sep 2020 14:31:18 +0800 From: Liu Shixin To: Stefan Schaeckeler , Borislav Petkov , Mauro Carvalho Chehab , Tony Luck , James Morse , Robert Richter , "Joel Stanley" , Andrew Jeffery CC: , , , , Liu Shixin Subject: [PATCH -next] EDAC/aspeed: use module_platform_driver to simplify the code Date: Mon, 14 Sep 2020 14:53:58 +0800 Message-ID: <20200914065358.3726216-1-liushixin2@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.113.32] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Liu Shixin --- drivers/edac/aspeed_edac.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c index fbec28dc661d..fde809efc520 100644 --- a/drivers/edac/aspeed_edac.c +++ b/drivers/edac/aspeed_edac.c @@ -388,23 +388,7 @@ static struct platform_driver aspeed_driver = { .probe = aspeed_probe, .remove = aspeed_remove }; - - -static int __init aspeed_init(void) -{ - return platform_driver_register(&aspeed_driver); -} - - -static void __exit aspeed_exit(void) -{ - platform_driver_unregister(&aspeed_driver); -} - - -module_init(aspeed_init); -module_exit(aspeed_exit); - +module_platform_driver(aspeed_driver); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Stefan Schaeckeler "); -- 2.25.1