summaryrefslogtreecommitdiff
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2021-06-01 13:07:46 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-06-08 15:53:19 +0200
commitda9a805b1249be685c2bee110eb1260d610bd5d0 (patch)
treeeba4488166d80cc058d09c2f1c086ca8deafb636 /drivers/media/usb
parent9ad1efee086e0e913914fa2b2173efb830bad68c (diff)
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>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r--drivers/media/usb/dvb-usb/cinergyT2-core.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/media/usb/dvb-usb/cinergyT2-core.c b/drivers/media/usb/dvb-usb/cinergyT2-core.c
index 4116ba5c45fc..23f1093d28f8 100644
--- a/drivers/media/usb/dvb-usb/cinergyT2-core.c
+++ b/drivers/media/usb/dvb-usb/cinergyT2-core.c
@@ -29,10 +29,8 @@ struct cinergyt2_state {
unsigned char data[64];
};
-/* We are missing a release hook with usb_device data */
-static struct dvb_usb_device *cinergyt2_usb_device;
-
-static struct dvb_usb_device_properties cinergyt2_properties;
+/* Forward declaration */
+static const struct dvb_usb_device_properties cinergyt2_properties;
static int cinergyt2_streaming_ctrl(struct dvb_usb_adapter *adap, int enable)
{
@@ -84,9 +82,6 @@ static int cinergyt2_frontend_attach(struct dvb_usb_adapter *adap)
}
mutex_unlock(&d->data_mutex);
- /* Copy this pointer as we are gonna need it in the release phase */
- cinergyt2_usb_device = adap->dev;
-
return ret;
}
@@ -205,7 +200,7 @@ static struct usb_device_id cinergyt2_usb_table[] = {
MODULE_DEVICE_TABLE(usb, cinergyt2_usb_table);
-static struct dvb_usb_device_properties cinergyt2_properties = {
+static const struct dvb_usb_device_properties cinergyt2_properties = {
.size_of_priv = sizeof(struct cinergyt2_state),
.num_adapters = 1,
.adapter = {