Commit 09a7480e authored by Erik Andr?n's avatar Erik Andr?n Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (11454): gspca - m5602-mt9m111: Remove the unused power_down struct member



The power_down sensor struct member is almost has no purpose in the current driver abstraction. Remove it.

Signed-off-by: default avatarErik Andr?n <erik.andren@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a594fb48
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -165,11 +165,6 @@ int mt9m111_init(struct sd *sd)
	return (err < 0) ? err : 0;
}

int mt9m111_power_down(struct sd *sd)
{
	return 0;
}

void mt9m111_disconnect(struct sd *sd)
{
	sd->sensor = NULL;
+0 −2
Original line number Diff line number Diff line
@@ -85,7 +85,6 @@ extern int dump_sensor;

int mt9m111_probe(struct sd *sd);
int mt9m111_init(struct sd *sd);
int mt9m111_power_down(struct sd *sd);
void mt9m111_disconnect(struct sd *sd);

int mt9m111_set_vflip(struct gspca_dev *gspca_dev, __s32 val);
@@ -103,7 +102,6 @@ const static struct m5602_sensor mt9m111 = {

	.probe = mt9m111_probe,
	.init = mt9m111_init,
	.power_down = mt9m111_power_down,
	.disconnect = mt9m111_disconnect,
};

+0 −17
Original line number Diff line number Diff line
@@ -467,26 +467,9 @@ int ov9650_stop(struct sd *sd)
	return m5602_write_sensor(sd, OV9650_COM2, &data, 1);
}

int ov9650_power_down(struct sd *sd)
{
	int i, err = 0;
	for (i = 0; i < ARRAY_SIZE(power_down_ov9650) && !err; i++) {
		u8 data = power_down_ov9650[i][2];
		if (power_down_ov9650[i][0] == SENSOR)
			err = m5602_write_sensor(sd,
					    power_down_ov9650[i][1], &data, 1);
		else
			err = m5602_write_bridge(sd, power_down_ov9650[i][1],
						 data);
	}

	return err;
}

void ov9650_disconnect(struct sd *sd)
{
	ov9650_stop(sd);
	ov9650_power_down(sd);

	sd->sensor = NULL;
	kfree(sd->sensor_priv);
+0 −22
Original line number Diff line number Diff line
@@ -137,7 +137,6 @@ int ov9650_probe(struct sd *sd);
int ov9650_init(struct sd *sd);
int ov9650_start(struct sd *sd);
int ov9650_stop(struct sd *sd);
int ov9650_power_down(struct sd *sd);
void ov9650_disconnect(struct sd *sd);

int ov9650_set_exposure(struct gspca_dev *gspca_dev, __s32 val);
@@ -167,7 +166,6 @@ const static struct m5602_sensor ov9650 = {
	.init = ov9650_init,
	.start = ov9650_start,
	.stop = ov9650_stop,
	.power_down = ov9650_power_down,
	.disconnect = ov9650_disconnect,
};

@@ -312,26 +310,6 @@ static const unsigned char init_ov9650[][3] =
	{SENSOR, OV9650_COM2, OV9650_SOFT_SLEEP | OV9650_OUTPUT_DRIVE_2X},
};

static const unsigned char power_down_ov9650[][3] =
{
	{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x04},
	{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
	{SENSOR, OV9650_COM7, 0x80},
	{SENSOR, OV9650_OFON, 0xf4},
	{SENSOR, OV9650_MVFP, 0x80},
	{SENSOR, OV9650_DBLV, 0x3f},
	{SENSOR, OV9650_RSVD36, 0x49},
	{SENSOR, OV9650_COM7, 0x05},

	{BRIDGE, M5602_XB_GPIO_DIR, 0x05},
	{BRIDGE, M5602_XB_GPIO_DAT, 0x04},
	{BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
	{BRIDGE, M5602_XB_GPIO_EN_L, 0x06},
	{BRIDGE, M5602_XB_GPIO_DAT_H, 0x02},
	{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x04},
	{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
};

static const unsigned char res_init_ov9650[][3] =
{
	{SENSOR, OV9650_COM2, OV9650_OUTPUT_DRIVE_2X},
+0 −5
Original line number Diff line number Diff line
@@ -397,11 +397,6 @@ int po1030_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val)
	return err;
}

int po1030_power_down(struct sd *sd)
{
	return 0;
}

void po1030_disconnect(struct sd *sd)
{
	sd->sensor = NULL;
Loading