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

Commit 9764398b authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (12086): gspca_sonixj: Fix control index numbering



The control index defines for the gspca_sonixj driver were numbered
wrong, causing us to disable the wrong controls on various sensors

Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent e080fcd9
Loading
Loading
Loading
Loading
+9 −3
Original line number Original line Diff line number Diff line
@@ -98,6 +98,7 @@ static int sd_setinfrared(struct gspca_dev *gspca_dev, __s32 val);
static int sd_getinfrared(struct gspca_dev *gspca_dev, __s32 *val);
static int sd_getinfrared(struct gspca_dev *gspca_dev, __s32 *val);


static struct ctrl sd_ctrls[] = {
static struct ctrl sd_ctrls[] = {
#define BRIGHTNESS_IDX 0
	{
	{
	    {
	    {
		.id      = V4L2_CID_BRIGHTNESS,
		.id      = V4L2_CID_BRIGHTNESS,
@@ -113,6 +114,7 @@ static struct ctrl sd_ctrls[] = {
	    .set = sd_setbrightness,
	    .set = sd_setbrightness,
	    .get = sd_getbrightness,
	    .get = sd_getbrightness,
	},
	},
#define CONTRAST_IDX 1
	{
	{
	    {
	    {
		.id      = V4L2_CID_CONTRAST,
		.id      = V4L2_CID_CONTRAST,
@@ -128,6 +130,7 @@ static struct ctrl sd_ctrls[] = {
	    .set = sd_setcontrast,
	    .set = sd_setcontrast,
	    .get = sd_getcontrast,
	    .get = sd_getcontrast,
	},
	},
#define COLOR_IDX 2
	{
	{
	    {
	    {
		.id      = V4L2_CID_SATURATION,
		.id      = V4L2_CID_SATURATION,
@@ -142,6 +145,7 @@ static struct ctrl sd_ctrls[] = {
	    .set = sd_setcolors,
	    .set = sd_setcolors,
	    .get = sd_getcolors,
	    .get = sd_getcolors,
	},
	},
#define BLUE_BALANCE_IDX 3
	{
	{
	    {
	    {
		.id      = V4L2_CID_BLUE_BALANCE,
		.id      = V4L2_CID_BLUE_BALANCE,
@@ -156,6 +160,7 @@ static struct ctrl sd_ctrls[] = {
	    .set = sd_setblue_balance,
	    .set = sd_setblue_balance,
	    .get = sd_getblue_balance,
	    .get = sd_getblue_balance,
	},
	},
#define RED_BALANCE_IDX 4
	{
	{
	    {
	    {
		.id      = V4L2_CID_RED_BALANCE,
		.id      = V4L2_CID_RED_BALANCE,
@@ -170,6 +175,7 @@ static struct ctrl sd_ctrls[] = {
	    .set = sd_setred_balance,
	    .set = sd_setred_balance,
	    .get = sd_getred_balance,
	    .get = sd_getred_balance,
	},
	},
#define GAMMA_IDX 5
	{
	{
	    {
	    {
		.id      = V4L2_CID_GAMMA,
		.id      = V4L2_CID_GAMMA,
@@ -184,7 +190,7 @@ static struct ctrl sd_ctrls[] = {
	    .set = sd_setgamma,
	    .set = sd_setgamma,
	    .get = sd_getgamma,
	    .get = sd_getgamma,
	},
	},
#define AUTOGAIN_IDX 5
#define AUTOGAIN_IDX 6
	{
	{
	    {
	    {
		.id      = V4L2_CID_AUTOGAIN,
		.id      = V4L2_CID_AUTOGAIN,
@@ -200,7 +206,7 @@ static struct ctrl sd_ctrls[] = {
	    .get = sd_getautogain,
	    .get = sd_getautogain,
	},
	},
/* ov7630/ov7648 only */
/* ov7630/ov7648 only */
#define VFLIP_IDX 6
#define VFLIP_IDX 7
	{
	{
	    {
	    {
		.id      = V4L2_CID_VFLIP,
		.id      = V4L2_CID_VFLIP,
@@ -216,7 +222,7 @@ static struct ctrl sd_ctrls[] = {
	    .get = sd_getvflip,
	    .get = sd_getvflip,
	},
	},
/* mt9v111 only */
/* mt9v111 only */
#define INFRARED_IDX 7
#define INFRARED_IDX 8
	{
	{
	    {
	    {
		.id      = V4L2_CID_INFRARED,
		.id      = V4L2_CID_INFRARED,