Messages in this thread | | | From | Peter Hüwe <> | Subject | Re: [tpmdd-devel] [PATCH 1/1] TPM: STMicroelectronics ST33 I2C KERNEL 3.x.x OOPS! | Date | Wed, 9 Jan 2013 20:41:18 +0100 |
| |
Hi,
> Do you have the I2C configuration activated ? > I have this error when I add the driver in a kernel with no I2C activated
I2C works fine on my beaglebone, however I did not add the platform data to my boardfile. a) as I don't use board files anymore but device trees ;) b) it's perfectly legit to load a driver without the platform data and probe it at runtime (which then in doubt fails to probe).
In my opinion a driver should never ever oops, even if the user does something stupid (e.g. like probing from userspace ;)
The fix is as simple as adding a simple if (!platform_data) return -ENODEV; or something similar.
Thanks, Peter
| |