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

media: cinergyt2: make properties const

The dvb_usb_device_properties can be const. This makes it clear that
the static can be shared across threads.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Sean Young and committed by
Mauro Carvalho Chehab
da9a805b 9ad1efee

+3 -8
+3 -8
drivers/media/usb/dvb-usb/cinergyT2-core.c
··· 29 29 unsigned char data[64]; 30 30 }; 31 31 32 - /* We are missing a release hook with usb_device data */ 33 - static struct dvb_usb_device *cinergyt2_usb_device; 34 - 35 - static struct dvb_usb_device_properties cinergyt2_properties; 32 + /* Forward declaration */ 33 + static const struct dvb_usb_device_properties cinergyt2_properties; 36 34 37 35 static int cinergyt2_streaming_ctrl(struct dvb_usb_adapter *adap, int enable) 38 36 { ··· 81 83 deb_rc("cinergyt2_power_ctrl() Failed to retrieve sleep state info\n"); 82 84 } 83 85 mutex_unlock(&d->data_mutex); 84 - 85 - /* Copy this pointer as we are gonna need it in the release phase */ 86 - cinergyt2_usb_device = adap->dev; 87 86 88 87 return ret; 89 88 } ··· 200 205 201 206 MODULE_DEVICE_TABLE(usb, cinergyt2_usb_table); 202 207 203 - static struct dvb_usb_device_properties cinergyt2_properties = { 208 + static const struct dvb_usb_device_properties cinergyt2_properties = { 204 209 .size_of_priv = sizeof(struct cinergyt2_state), 205 210 .num_adapters = 1, 206 211 .adapter = {