ts2020_attach() allocates a variable pdata on the stack and then passes a
pointer to it to i2c_new_device() which stashes the pointer in persistent
structures.
Add a comment to the effect that this isn't actually an error because the
contents of the variable are only used in ts2020_probe() and this is only
called ts2020_attach()'s stack frame exists.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
{
struct i2c_client *client;
struct i2c_board_info board_info;
+
+ /* This is only used by ts2020_probe() so can be on the stack */
struct ts2020_config pdata;
memcpy(&pdata, config, sizeof(pdata));