Commit 75fac96
committed
sensor_i2c/hi3516cv300: declare MODULE_LICENSE("GPL")
User-reported failure on real hi3516cv300 hardware (IMX323 over I2C,
OpenIPC 2.6.04.28-lite):
open_sensor_i2c: Unknown symbol i2c_new_device (err 0)
open_sensor_i2c: Unknown symbol i2c_unregister_device (err 0)
The kernel's `i2c_new_device` / `i2c_unregister_device` are
`EXPORT_SYMBOL_GPL`. With no `MODULE_LICENSE` in this module, the
kernel treats it as proprietary and refuses to resolve those symbols.
The cv300 sensor_i2c module was added in #38 (commit 20882c6) without
module init/exit boilerplate or license declaration — it was a
half-port of the vendor's combined `hi3516cv300_sensor.ko`, where the
top-level wrapper would have lived. Sensor_spi (split out by the same
port) doesn't hit this because all the helpers it calls (ioremap_nocache,
iounmap, …) are non-GPL exports, and the recent #59 added `EXPORT_SYMBOL`
for ssp_drv_*. The i2c branch of i2c_drv.c hits two GPL-only symbols
that have always required this license tag.
Verified live on hi3516cv300 hardware (172.17.32.126) reproducing the
user's `Unknown symbol i2c_new_device` failure. Building this fix and
testing on the same camera confirms `open_sensor_i2c.ko` loads cleanly
once the license tag is in place (combined with the firmware-side fix
in OpenIPC/firmware#2030 that ships and pre-loads sensor_spi for cv300).
A proper module_init / module_exit / module_param wrapper for cv300
sensor_i2c is a separate, larger piece of work — not addressed here.
The .ko's load-time symbol resolution is what blocks the camera; once
that succeeds, the symbols inside (i2c_drv_init etc.) are reachable
through the existing in-kernel callback mechanism, same as before.
Refs #62, #66.1 parent e2aa062 commit 75fac96
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
0 commit comments