i2c/quark_se_ss: create empty .set_callback()

The i2c_set_callback() does not check for NULL pointers
in driver's API struct. So create an empty set_callback()
function to avoid runtime exceptions, if it is called.

Change-Id: Iad8fed62228d10d42b8189e76873eb4c2ad12eb3
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2015-12-07 09:57:31 -08:00 committed by Anas Nashif
commit ff49fa0685

View file

@ -650,12 +650,21 @@ static int i2c_qse_ss_resume(struct device *dev)
return DEV_OK;
}
static int i2c_qse_ss_set_callback(struct device *dev, i2c_callback cb)
{
ARG_UNUSED(dev);
ARG_UNUSED(cb);
return DEV_INVALID_OP;
}
static struct i2c_driver_api ss_funcs = {
.configure = i2c_qse_ss_runtime_configure,
.transfer = i2c_qse_ss_intr_transfer,
.poll_transfer = i2c_qse_ss_poll_transfer,
.suspend = i2c_qse_ss_suspend,
.resume = i2c_qse_ss_resume,
.set_callback = i2c_qse_ss_set_callback,
};
int i2c_qse_ss_initialize(struct device *dev)