Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp853355pxb; Thu, 28 Jan 2021 01:41:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIF43UacPvxUJaNoLm25MFxgcPiKESdafmJoHlB04jZw5Jo40VV0JYjIDl/RpLWjYkvvMh X-Received: by 2002:a17:907:961d:: with SMTP id gb29mr10380945ejc.460.1611826885806; Thu, 28 Jan 2021 01:41:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611826885; cv=none; d=google.com; s=arc-20160816; b=jT7PuwaUR/ZPBgVtKH65rRh4j5xILHly7cUhWVJpU6qccQzjZzQNWpGLqJ5+JDpQsX bsAEDDv6yFXLRzBSgKgSA92EF07caiEpJma5uJoG2aewVoskC2yqFIQFB/N4UpPQQb2s o4WVBAB71y4yN5gpJA/31sPaQZO4dQhY8JYAhxpWLvIwWRaPyXn4CsWOuoblwPV2kzvj 5kbOY9OA+ssP+nNmoRv32qxlBfjFrBU5VygINWLWfamNuqh7F8xIgxuOyxdNlxMVxwP1 K9drQiICDdB9io779z7xepofnWa6rqZEl96gOXS98E26cYn8tO5Glsw/xXErri/0Uchm rQdg== 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:dkim-signature; bh=u572uRJOAm3kNOY9kS7OvdsbJ0boIJxgCpqT07Onf2k=; b=V6awfbud1J6DaqVIEpZtjTo959VRmMj4Ix2eF6p/KSTqbxEG8G4upRv07fEgSTbt/X GegBFQFdiB0wiPte+eWG4MFixuV19O9tBKcWJVKM9gvqJd67kFKWIMfHsn9EVNMbRZhd CNKybvINsP3+ppt0iUQ+d0JWOuBKaq0K140Q+sVPobrcSV5+lmPq719rcz959mo6k8Kv dD6T5e3q0CCLcEyAypsnEEJaVLak/kInwsncGjVhYAuHCiUKPzLfAtmshX2xwZivtuNU clh0HePxcAv/D8detlkqQZtDp258Cvd093CZveqHe01fDpSDOpRriemRj8BB6INs5yMB T5zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=LHOoLY13; 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=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si2676125edd.574.2021.01.28.01.41.00; Thu, 28 Jan 2021 01:41:25 -0800 (PST) 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; dkim=pass header.i=@163.com header.s=s110527 header.b=LHOoLY13; 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=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231377AbhA1Jjn (ORCPT + 99 others); Thu, 28 Jan 2021 04:39:43 -0500 Received: from m12-14.163.com ([220.181.12.14]:53403 "EHLO m12-14.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232489AbhA1Jaw (ORCPT ); Thu, 28 Jan 2021 04:30:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=u572u RJOAm3kNOY9kS7OvdsbJ0boIJxgCpqT07Onf2k=; b=LHOoLY13HCGKNOo0D3qiL XdZJnWyHz92xKWw4rXtY6orqheMhfe/z7l5ikOLBc6Ri2aGTaeDjoPkXMRfxF/B6 2/7E57OhZ5vnVBKMrVptm9afIn1RHA1Nj3ds9J1XrG13tklYUUTVn6bIRNdH2fVH AGEXrHCngXzMk1OuBuRSTY= Received: from COOL-20201222LC.ccdomain.com (unknown [218.94.48.178]) by smtp10 (Coremail) with SMTP id DsCowAAHwbY8NRJgxjLNiA--.49842S2; Thu, 28 Jan 2021 11:53:35 +0800 (CST) From: dingsenjie@163.com To: davem@davemloft.net, kuba@kernel.org, andrew@lunn.ch, leon@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, dingsenjie Subject: [PATCH] net/ethernet: convert to use module_platform_driver in octeon_mgmt.c Date: Thu, 28 Jan 2021 11:53:30 +0800 Message-Id: <20210128035330.17676-1-dingsenjie@163.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: DsCowAAHwbY8NRJgxjLNiA--.49842S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrZw47KFW3KFW7Kr1DCrWDtwb_yoWkKrbE9r 1xX3WfXF4UCr1Fka1qgw1a93ySka4kZrn3GF4IgrZ0qa13Wwn0v34DArW7Xw1kWr4xJFyD CrsrGFy7C3y2yjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU58Ma5UUUUU== X-Originating-IP: [218.94.48.178] X-CM-SenderInfo: 5glqw25hqmxvi6rwjhhfrp/1tbipRUnyFUMcFIUcwAGsF Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: dingsenjie Simplify the code by using module_platform_driver macro for octeon_mgmt. Signed-off-by: dingsenjie --- drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c index 5e50bb1..ecffebd 100644 --- a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c +++ b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c @@ -1556,18 +1556,7 @@ static int octeon_mgmt_remove(struct platform_device *pdev) .remove = octeon_mgmt_remove, }; -static int __init octeon_mgmt_mod_init(void) -{ - return platform_driver_register(&octeon_mgmt_driver); -} - -static void __exit octeon_mgmt_mod_exit(void) -{ - platform_driver_unregister(&octeon_mgmt_driver); -} - -module_init(octeon_mgmt_mod_init); -module_exit(octeon_mgmt_mod_exit); +module_platform_driver(octeon_mgmt_driver); MODULE_SOFTDEP("pre: mdio-cavium"); MODULE_DESCRIPTION(DRV_DESCRIPTION); -- 1.9.1