Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1584876 > unrolled thread
| Started by | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| First post | 2017-02-20 21:20 +0100 |
| Last post | 2017-02-20 22:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] [media] et8ek8: Export OF device ID as module aliases Javier Martinez Canillas <javier@osg.samsung.com> - 2017-02-20 21:20 +0100
Re: [PATCH] [media] et8ek8: Export OF device ID as module aliases Sakari Ailus <sakari.ailus@iki.fi> - 2017-02-20 22:40 +0100
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2017-02-20 21:20 +0100 |
| Subject | [PATCH] [media] et8ek8: Export OF device ID as module aliases |
| Message-ID | <td2Bb-Sm-3@gated-at.bofh.it> |
The I2C core always reports a MODALIAS of the form i2c:<foo> even if the
device was registered via OF, this means that exporting the OF device ID
table device aliases in the module is not needed. But in order to change
how the core reports modaliases to user-space, it's better to export it.
Before this patch:
$ modinfo drivers/media/i2c/et8ek8/et8ek8.ko | grep alias
alias: i2c:et8ek8
After this patch:
$ modinfo drivers/media/i2c/et8ek8/et8ek8.ko | grep alias
alias: i2c:et8ek8
alias: of:N*T*Ctoshiba,et8ek8C*
alias: of:N*T*Ctoshiba,et8ek8
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/media/i2c/et8ek8/et8ek8_driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/i2c/et8ek8/et8ek8_driver.c b/drivers/media/i2c/et8ek8/et8ek8_driver.c
index bec4a563a09c..f39f5179dd95 100644
--- a/drivers/media/i2c/et8ek8/et8ek8_driver.c
+++ b/drivers/media/i2c/et8ek8/et8ek8_driver.c
@@ -1485,6 +1485,7 @@ static const struct of_device_id et8ek8_of_table[] = {
{ .compatible = "toshiba,et8ek8" },
{ },
};
+MODULE_DEVICE_TABLE(of, et8ek8_of_table);
static const struct i2c_device_id et8ek8_id_table[] = {
{ ET8EK8_NAME, 0 },
--
2.9.3
[toc] | [next] | [standalone]
| From | Sakari Ailus <sakari.ailus@iki.fi> |
|---|---|
| Date | 2017-02-20 22:40 +0100 |
| Message-ID | <td3QB-1zq-9@gated-at.bofh.it> |
| In reply to | #1584876 |
On Mon, Feb 20, 2017 at 05:16:16PM -0300, Javier Martinez Canillas wrote: > The I2C core always reports a MODALIAS of the form i2c:<foo> even if the > device was registered via OF, this means that exporting the OF device ID > table device aliases in the module is not needed. But in order to change > how the core reports modaliases to user-space, it's better to export it. > > Before this patch: > > $ modinfo drivers/media/i2c/et8ek8/et8ek8.ko | grep alias > alias: i2c:et8ek8 > > After this patch: > > $ modinfo drivers/media/i2c/et8ek8/et8ek8.ko | grep alias > alias: i2c:et8ek8 > alias: of:N*T*Ctoshiba,et8ek8C* > alias: of:N*T*Ctoshiba,et8ek8 > > Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Thanks! Applied to my tree (for-v4.12 branch). -- Sakari Ailus e-mail: sakari.ailus@iki.fi XMPP: sailus@retiisi.org.uk
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web