[added,to,the,4.1,stable,tree,media] hdpvr: hide unused variable

Message ID 20180301152116.1486-481-alexander.levin@microsoft.com
State New
Headers show
  • [added,to,the,4.1,stable,tree,media] hdpvr: hide unused variable
Related show

Commit Message

Sasha Levin March 1, 2018, 3:27 p.m.
From: Arnd Bergmann <arnd@arndb.de>

This patch has been added to the 4.1 stable tree. If you have any
objections, please let us know.




[ Upstream commit b97baa3e22e18dac42001e665cf27ad1211bf878 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
 drivers/media/usb/hdpvr/hdpvr-core.c | 2 ++
 1 file changed, 2 insertions(+)

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,
 	struct hdpvr_device *dev;
 	struct usb_host_interface *iface_desc;
 	struct usb_endpoint_descriptor *endpoint;
 	struct i2c_client *client;
 	size_t buffer_size;
 	int i;
 	int retval = -ENOMEM;