Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fb2e072 authored by Arvind Yadav's avatar Arvind Yadav Committed by Mauro Carvalho Chehab
Browse files

media: usb: constify usb_device_id



usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

'drivers/media/usb/b2c2/flexcop-usb.c' Fix checkpatch.pl error:
ERROR: space prohibited before open square bracket '['.

Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent a3b215ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1087,7 +1087,7 @@ static int airspy_probe(struct usb_interface *intf,
}

/* USB device ID list */
static struct usb_device_id airspy_id_table[] = {
static const struct usb_device_id airspy_id_table[] = {
	{ USB_DEVICE(0x1d50, 0x60a1) }, /* AirSpy */
	{ }
};
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ static void as102_usb_stop_stream(struct as102_dev_t *dev);
static int as102_open(struct inode *inode, struct file *file);
static int as102_release(struct inode *inode, struct file *file);

static struct usb_device_id as102_usb_id_table[] = {
static const struct usb_device_id as102_usb_id_table[] = {
	{ USB_DEVICE(AS102_USB_DEVICE_VENDOR_ID, AS102_USB_DEVICE_PID_0001) },
	{ USB_DEVICE(PCTV_74E_USB_VID, PCTV_74E_USB_PID) },
	{ USB_DEVICE(ELGATO_EYETV_DTT_USB_VID, ELGATO_EYETV_DTT_USB_PID) },
+1 −1
Original line number Diff line number Diff line
@@ -596,7 +596,7 @@ static void flexcop_usb_disconnect(struct usb_interface *intf)
	info("%s successfully deinitialized and disconnected.", DRIVER_NAME);
}

static struct usb_device_id flexcop_usb_table [] = {
static const struct usb_device_id flexcop_usb_table[] = {
	{ USB_DEVICE(0x0af7, 0x0101) },
	{ }
};
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ static int submit_urbs(struct camera_data *cam);
static int set_alternate(struct camera_data *cam, unsigned int alt);
static int configure_transfer_mode(struct camera_data *cam, unsigned int alt);

static struct usb_device_id cpia2_id_table[] = {
static const struct usb_device_id cpia2_id_table[] = {
	{USB_DEVICE(0x0553, 0x0100)},
	{USB_DEVICE(0x0553, 0x0140)},
	{USB_DEVICE(0x0553, 0x0151)},  /* STV0676 */
+1 −1
Original line number Diff line number Diff line
@@ -933,7 +933,7 @@ static struct dvb_usb_device_properties az6007_cablestar_hdci_props = {
	}
};

static struct usb_device_id az6007_usb_table[] = {
static const struct usb_device_id az6007_usb_table[] = {
	{DVB_USB_DEVICE(USB_VID_AZUREWAVE, USB_PID_AZUREWAVE_6007,
		&az6007_props, "Azurewave 6007", RC_MAP_EMPTY)},
	{DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_H7,
Loading