Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp868600pxk; Thu, 17 Sep 2020 19:44:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjcb/cD/mphsdlxpeJSNIAieJuBBV1jtzcfCyacowBMtB+prgsIKp3IV3NnoCspN9h/JRK X-Received: by 2002:a17:906:f150:: with SMTP id gw16mr32076960ejb.528.1600397086697; Thu, 17 Sep 2020 19:44:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600397086; cv=none; d=google.com; s=arc-20160816; b=Kap0y7N3RqN4uzhlvllpFDeNhZ6kL8H+n7OWyBHhikgCDwLHzvt1cbaMH1bmosM3dJ XZZS80hvXrgKbtOgcKcoZ4DgDsJYpuhHDX57XGI0xz5Jtma02AHL7El7xNqjYSWCMptN hhEmRH32KA7osXLB5cUPbn6OAf7okB25FoIJFqgkb+q4J/AuCze5NUN1vBwB2M1xtW4V EOMfW6zec6nO+Hm8+x7jKY43doJna/2X8Gnw3ExAusr/xQbUDtZ6vmK07WlqW7Ug1klK ftQitT54CeZ6Xk9loNx9TtYuzLVhuvxtRuTcXxPbSCovfhBAkJo3V1X9wtc0VHuleJDV AKpg== 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=TE5x89TPst7l9DDUHyTRHqvdiW/M7BD8pM7tjQ1+C4o=; b=pHF7ZBkByLzj2XUtzBB0GXm9LNB7I7pleP0CzIwvlckCBFuU54MAY32XzXzrVUpAqP infkK26QtW5by+aYFtSpOyxHcoE+tKMCFlYDbFsSmQEKgczuA7GeY1YL3TJ86V6IF908 Ve8ehKZ9OAjS9SN0EoHRYAAIpbmyP9ENtzbD2ZPZW+EH7WAybuyRZ2H030rIO2hyr/MI aM55xl9/tHb7gOBNsDxFuaW9rD6iinQOKAE7xHU41uL6K9rbAj2J0OS6mCBhG/4e99VK FQRNsLZGr4oIPXmQ9uJ/pU52ensd9Ee0ak0aj/Zlkfnf8crb7rpoBIyM0lB6lKYs3Mko 2+EQ== 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 d20si1120917ejb.704.2020.09.17.19.44.23; Thu, 17 Sep 2020 19:44:46 -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 S1730080AbgIRCkV (ORCPT + 99 others); Thu, 17 Sep 2020 22:40:21 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:33634 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728246AbgIRCkF (ORCPT ); Thu, 17 Sep 2020 22:40:05 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 77798DD5430AFF1AA5CD; Fri, 18 Sep 2020 10:40:03 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Fri, 18 Sep 2020 10:39:54 +0800 From: Liu Shixin To: Arnd Bergmann , Greg Kroah-Hartman CC: , Liu Shixin Subject: [PATCH -next] eeprom: ee1004: use module_i2c_driver to simplify the code Date: Fri, 18 Sep 2020 11:02:25 +0800 Message-ID: <20200918030225.3902750-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the module_i2c_driver() macro to make the code smaller and a bit simpler. Signed-off-by: Liu Shixin --- drivers/misc/eeprom/ee1004.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/misc/eeprom/ee1004.c b/drivers/misc/eeprom/ee1004.c index b081c67416d7..252e15ba65e1 100644 --- a/drivers/misc/eeprom/ee1004.c +++ b/drivers/misc/eeprom/ee1004.c @@ -280,18 +280,7 @@ static struct i2c_driver ee1004_driver = { .remove = ee1004_remove, .id_table = ee1004_ids, }; - -static int __init ee1004_init(void) -{ - return i2c_add_driver(&ee1004_driver); -} -module_init(ee1004_init); - -static void __exit ee1004_exit(void) -{ - i2c_del_driver(&ee1004_driver); -} -module_exit(ee1004_exit); +module_i2c_driver(ee1004_driver); MODULE_DESCRIPTION("Driver for EE1004-compliant DDR4 SPD EEPROMs"); MODULE_AUTHOR("Jean Delvare"); -- 2.25.1