Commit 9ecf9b08 authored by Peter Senna Tschudin's avatar Peter Senna Tschudin Committed by Mauro Carvalho Chehab

[media] [V2,22/24] usb/hdpvr/hdpvr-core.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_I2C) || \
     defined(CONFIG_I2C_MODULE)
with:
 #if IS_ENABLED(CONFIG_I2C)
This change was made for: CONFIG_I2C
Reported-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent f1c16adc
...@@ -391,7 +391,7 @@ static int hdpvr_probe(struct usb_interface *interface, ...@@ -391,7 +391,7 @@ static int hdpvr_probe(struct usb_interface *interface,
goto error; goto error;
} }
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) #if IS_ENABLED(CONFIG_I2C)
retval = hdpvr_register_i2c_adapter(dev); retval = hdpvr_register_i2c_adapter(dev);
if (retval < 0) { if (retval < 0) {
v4l2_err(&dev->v4l2_dev, "i2c adapter register failed\n"); v4l2_err(&dev->v4l2_dev, "i2c adapter register failed\n");
...@@ -419,7 +419,7 @@ static int hdpvr_probe(struct usb_interface *interface, ...@@ -419,7 +419,7 @@ static int hdpvr_probe(struct usb_interface *interface,
return 0; return 0;
reg_fail: reg_fail:
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) #if IS_ENABLED(CONFIG_I2C)
i2c_del_adapter(&dev->i2c_adapter); i2c_del_adapter(&dev->i2c_adapter);
#endif #endif
error: error:
...@@ -451,7 +451,7 @@ static void hdpvr_disconnect(struct usb_interface *interface) ...@@ -451,7 +451,7 @@ static void hdpvr_disconnect(struct usb_interface *interface)
mutex_lock(&dev->io_mutex); mutex_lock(&dev->io_mutex);
hdpvr_cancel_queue(dev); hdpvr_cancel_queue(dev);
mutex_unlock(&dev->io_mutex); mutex_unlock(&dev->io_mutex);
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) #if IS_ENABLED(CONFIG_I2C)
i2c_del_adapter(&dev->i2c_adapter); i2c_del_adapter(&dev->i2c_adapter);
#endif #endif
video_unregister_device(dev->video_dev); video_unregister_device(dev->video_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment