Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Arnd Bergmann and committed by
Mauro Carvalho Chehab
b97baa3e 458a3952

+2
+2
drivers/media/usb/hdpvr/hdpvr-core.c
··· 273 273 struct hdpvr_device *dev; 274 274 struct usb_host_interface *iface_desc; 275 275 struct usb_endpoint_descriptor *endpoint; 276 + #if IS_ENABLED(CONFIG_I2C) 276 277 struct i2c_client *client; 278 + #endif 277 279 size_t buffer_size; 278 280 int i; 279 281 int retval = -ENOMEM;