lkml.org 
[lkml]   [2013]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [tpmdd-devel] [PATCH 1/1] TPM: STMicroelectronics ST33 I2C KERNEL 3.x.x OOPS!
Date
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



\
 
 \ /
  Last update: 2013-01-09 21:21    [W:0.245 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site