Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1410403
| Path | csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | William Breathitt Gray <vilhelm.gray@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] i2c: pca-isa: Utilize the module_isa_driver macro |
| Date | Tue, 31 May 2016 18:30:02 +0200 |
| Message-ID | <rEUIi-50B-13@gated-at.bofh.it> (permalink) |
| X-Original-To | wsa@the-dreams.de |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=3PmfZ5BuoYFz9XTiXteoCuVVMsRh1UwmUsYnFDfixzA=; b=GrbJE5KyyoyiEvt3fJjZdja5qfIEnnFrCjgEC8XeKxKju63udR0GS/qMrEssx5V8yX vmNkbMWljVhWS7q6XUK4qasSgC04UTmlK55NYFPdUWClfhh9PokibU0KIKD5bZjUVnqR GmYt8kPZtmeBLlk0VA3a3v9OQYJVQmu2GVuT6KXUPM63Ibya8O2Y5kJbl4rMYH2O2hba sW2nxG1+uapr00b8EN3Rdcx1YGXamMV4dqCXpyegU0k6oyImobJVm1qCFrg1QT4Q0Uul QRSXTsCyCDUJdRuG5wn94x4/zWzwIYmyEErse/7rWbzf/6UuOsbzZkfUtjPPbA6Bru8F J/Aw== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=3PmfZ5BuoYFz9XTiXteoCuVVMsRh1UwmUsYnFDfixzA=; b=CQs8WA2il/ztrY1KDMVjVmS4GwZCIDMfxeJ6nYUtd086A8w7hHlEjZLWdUS3mAnBDc gGRfcKNfp+arfglkMbPYDF+aTc/L01fhKeKYhsvcldtASy6JH+VshW/sxcwNZnaTVOz7 Q9EofoTwbZq96hj+iT3PeDU31Pu5WbTnI4giKTgTf3Gh44CpnH/oeZd9qreoSQEYtFea 0z0BQokJJbblZDd5oxAwGF8gOvj8q3bhfk+wAvY9OTYZ93xqZ00taGOsZhZywDSzSyZ7 BvYFNQz41Q+43vcnnQcQjicFgTF2I/L6QZF0tZuJc9irAOuO7iVKpVZ8qvgHCLfuiNu5 9i8g== |
| X-Gm-Message-State | ALyK8tIOQdJPmzGHkIFdeU/e/O8Y0OHijaB1lrdd0Erq6rMRCr4glOCDutO+uZn0b41Jhg== |
| X-Received | by 10.37.37.138 with SMTP id l132mr12943584ybl.170.1464711761330; Tue, 31 May 2016 09:22:41 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.24 (2015-08-30) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 39 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Tue, 31 May 2016 12:22:34 -0400 |
| X-Original-Message-ID | <20160531162223.GA17106@sophia> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1410403 |
Show key headers only | View raw
This driver does not do anything special in module init/exit. This patch
eliminates the module init/exit boilerplate code by utilizing the
module_isa_driver macro.
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
drivers/i2c/busses/i2c-pca-isa.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/i2c/busses/i2c-pca-isa.c b/drivers/i2c/busses/i2c-pca-isa.c
index e0eb4ca..d916fc4 100644
--- a/drivers/i2c/busses/i2c-pca-isa.c
+++ b/drivers/i2c/busses/i2c-pca-isa.c
@@ -193,16 +193,6 @@ static struct isa_driver pca_isa_driver = {
}
};
-static int __init pca_isa_init(void)
-{
- return isa_register_driver(&pca_isa_driver, 1);
-}
-
-static void __exit pca_isa_exit(void)
-{
- isa_unregister_driver(&pca_isa_driver);
-}
-
MODULE_AUTHOR("Ian Campbell <icampbell@arcom.com>");
MODULE_DESCRIPTION("ISA base PCA9564/PCA9665 driver");
MODULE_LICENSE("GPL");
@@ -221,5 +211,4 @@ MODULE_PARM_DESC(clock, "Clock rate in hertz.\n\t\t"
"\t\t\t\tFast+: 400100 - 10000099\n"
"\t\t\t\tTurbo: Up to 1265800");
-module_init(pca_isa_init);
-module_exit(pca_isa_exit);
+module_isa_driver(pca_isa_driver, 1);
--
2.7.3
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] i2c: pca-isa: Utilize the module_isa_driver macro William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-05-31 18:30 +0200
csiph-web