diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-01-26 09:09:56 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-02-01 10:14:27 -0500 |
commit | b97baa3e22e18dac42001e665cf27ad1211bf878 (patch) | |
tree | 8eed6ebafeae5b4ba2a09d8b1ac6180237ab6c33 | |
parent | 458a39523542c4479a69b98743436fb761f03796 (diff) |
[media] hdpvr: hide unused variable
The i2c client pointer is only used when CONFIG_I2C is set, and
otherwise produces a compile-time warning:
drivers/media/usb/hdpvr/hdpvr-core.c: In function 'hdpvr_probe':
drivers/media/usb/hdpvr/hdpvr-core.c:276:21: error: unused variable 'client' [-Werror=unused-variable]
This uses the same #ifdef to hide the variable when the code using
it is hidden.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/usb/hdpvr/hdpvr-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/usb/hdpvr/hdpvr-core.c b/drivers/media/usb/hdpvr/hdpvr-core.c index 3fc64197b4e6..08f0ca7aa012 100644 --- a/drivers/media/usb/hdpvr/hdpvr-core.c +++ b/drivers/media/usb/hdpvr/hdpvr-core.c | |||
@@ -273,7 +273,9 @@ static int hdpvr_probe(struct usb_interface *interface, | |||
273 | struct hdpvr_device *dev; | 273 | struct hdpvr_device *dev; |
274 | struct usb_host_interface *iface_desc; | 274 | struct usb_host_interface *iface_desc; |
275 | struct usb_endpoint_descriptor *endpoint; | 275 | struct usb_endpoint_descriptor *endpoint; |
276 | #if IS_ENABLED(CONFIG_I2C) | ||
276 | struct i2c_client *client; | 277 | struct i2c_client *client; |
278 | #endif | ||
277 | size_t buffer_size; | 279 | size_t buffer_size; |
278 | int i; | 280 | int i; |
279 | int retval = -ENOMEM; | 281 | int retval = -ENOMEM; |