aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/hdpvr/hdpvr-i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/hdpvr/hdpvr-i2c.c')
-rw-r--r--drivers/media/usb/hdpvr/hdpvr-i2c.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/usb/hdpvr/hdpvr-i2c.c b/drivers/media/usb/hdpvr/hdpvr-i2c.c
index 031cf024304c..a38f58c4c6bf 100644
--- a/drivers/media/usb/hdpvr/hdpvr-i2c.c
+++ b/drivers/media/usb/hdpvr/hdpvr-i2c.c
@@ -13,7 +13,7 @@
13 * 13 *
14 */ 14 */
15 15
16#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) 16#if IS_ENABLED(CONFIG_I2C)
17 17
18#include <linux/i2c.h> 18#include <linux/i2c.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
@@ -217,8 +217,7 @@ int hdpvr_register_i2c_adapter(struct hdpvr_device *dev)
217 217
218 hdpvr_activate_ir(dev); 218 hdpvr_activate_ir(dev);
219 219
220 memcpy(&dev->i2c_adapter, &hdpvr_i2c_adapter_template, 220 dev->i2c_adapter = hdpvr_i2c_adapter_template;
221 sizeof(struct i2c_adapter));
222 dev->i2c_adapter.dev.parent = &dev->udev->dev; 221 dev->i2c_adapter.dev.parent = &dev->udev->dev;
223 222
224 i2c_set_adapdata(&dev->i2c_adapter, dev); 223 i2c_set_adapdata(&dev->i2c_adapter, dev);