Commit 0f20baad authored by David Howells's avatar David Howells Committed by Mauro Carvalho Chehab

[media] ts2020: Copy loop_through from the config to the internal data

Copy the loop_through setting from the ts2020_config struct to the internal
ts2020_priv struct so that it can actually be used.

Whilst we're at it, group the bitfields together in the same order in both
structs so that the compiler has a good chance to copy them in one go.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 3366cd5d
...@@ -37,6 +37,7 @@ struct ts2020_priv { ...@@ -37,6 +37,7 @@ struct ts2020_priv {
/* i2c details */ /* i2c details */
struct i2c_adapter *i2c; struct i2c_adapter *i2c;
int i2c_address; int i2c_address;
bool loop_through:1;
u8 clk_out:2; u8 clk_out:2;
u8 clk_out_div:5; u8 clk_out_div:5;
u32 frequency_div; /* LO output divider switch frequency */ u32 frequency_div; /* LO output divider switch frequency */
...@@ -44,7 +45,6 @@ struct ts2020_priv { ...@@ -44,7 +45,6 @@ struct ts2020_priv {
#define TS2020_M88TS2020 0 #define TS2020_M88TS2020 0
#define TS2020_M88TS2022 1 #define TS2020_M88TS2022 1
u8 tuner; u8 tuner;
u8 loop_through:1;
}; };
struct ts2020_reg_val { struct ts2020_reg_val {
...@@ -582,6 +582,7 @@ static int ts2020_probe(struct i2c_client *client, ...@@ -582,6 +582,7 @@ static int ts2020_probe(struct i2c_client *client,
dev->i2c = client->adapter; dev->i2c = client->adapter;
dev->i2c_address = client->addr; dev->i2c_address = client->addr;
dev->loop_through = pdata->loop_through;
dev->clk_out = pdata->clk_out; dev->clk_out = pdata->clk_out;
dev->clk_out_div = pdata->clk_out_div; dev->clk_out_div = pdata->clk_out_div;
dev->frequency_div = pdata->frequency_div; dev->frequency_div = pdata->frequency_div;
......
...@@ -32,7 +32,7 @@ struct ts2020_config { ...@@ -32,7 +32,7 @@ struct ts2020_config {
/* /*
* RF loop-through * RF loop-through
*/ */
u8 loop_through:1; bool loop_through:1;
/* /*
* clock output * clock output
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment