1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

use enums instead of types

This commit is contained in:
Ralph Metzler 2017-09-10 23:11:15 +02:00
parent 0dd0997133
commit b814cf09e4
2 changed files with 11 additions and 10 deletions

View File

@ -111,7 +111,7 @@ static int lnb_set_sat(struct ddb *dev, u32 link,
} }
static int lnb_set_tone(struct ddb *dev, u32 link, u32 input, static int lnb_set_tone(struct ddb *dev, u32 link, u32 input,
fe_sec_tone_mode_t tone) enum fe_sec_tone_mode tone)
{ {
int s = 0; int s = 0;
u32 mask = (1ULL << input); u32 mask = (1ULL << input);
@ -130,14 +130,14 @@ static int lnb_set_tone(struct ddb *dev, u32 link, u32 input,
default: default:
s = -EINVAL; s = -EINVAL;
break; break;
}; }
if (!s) if (!s)
s = lnb_command(dev, link, input, LNB_CMD_NOP); s = lnb_command(dev, link, input, LNB_CMD_NOP);
return s; return s;
} }
static int lnb_set_voltage(struct ddb *dev, u32 link, u32 input, static int lnb_set_voltage(struct ddb *dev, u32 link, u32 input,
fe_sec_voltage_t voltage) enum fe_sec_voltage voltage)
{ {
int s = 0; int s = 0;
@ -158,7 +158,7 @@ static int lnb_set_voltage(struct ddb *dev, u32 link, u32 input,
default: default:
s = -EINVAL; s = -EINVAL;
break; break;
}; }
dev->link[link].lnb.oldvoltage[input] = voltage; dev->link[link].lnb.oldvoltage[input] = voltage;
return s; return s;
} }
@ -198,7 +198,7 @@ static int max_set_input(struct dvb_frontend *fe, int in)
return res; return res;
} }
static int max_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) static int max_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone)
{ {
struct ddb_input *input = fe->sec_priv; struct ddb_input *input = fe->sec_priv;
struct ddb_port *port = input->port; struct ddb_port *port = input->port;
@ -236,7 +236,7 @@ static int max_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone)
return res; return res;
} }
static int max_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) static int max_set_voltage(struct dvb_frontend *fe, enum fe_sec_voltage voltage)
{ {
struct ddb_input *input = fe->sec_priv; struct ddb_input *input = fe->sec_priv;
struct ddb_port *port = input->port; struct ddb_port *port = input->port;
@ -337,7 +337,7 @@ static int max_enable_high_lnb_voltage(struct dvb_frontend *fe, long arg)
return 0; return 0;
} }
static int max_send_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t burst) static int max_send_burst(struct dvb_frontend *fe, enum fe_sec_mini_cmd burst)
{ {
return 0; return 0;
} }

View File

@ -247,11 +247,12 @@ struct ddb_dvb {
u32 attached; u32 attached;
u8 input; u8 input;
fe_sec_tone_mode_t tone; enum fe_sec_tone_mode tone;
fe_sec_voltage_t voltage; enum fe_sec_voltage voltage;
int (*i2c_gate_ctrl)(struct dvb_frontend *, int); int (*i2c_gate_ctrl)(struct dvb_frontend *, int);
int (*set_voltage)(struct dvb_frontend *fe, fe_sec_voltage_t voltage); int (*set_voltage)(struct dvb_frontend *fe,
enum fe_sec_voltage voltage);
int (*set_input)(struct dvb_frontend *fe, int input); int (*set_input)(struct dvb_frontend *fe, int input);
int (*diseqc_send_master_cmd)(struct dvb_frontend *fe, int (*diseqc_send_master_cmd)(struct dvb_frontend *fe,
struct dvb_diseqc_master_cmd *cmd); struct dvb_diseqc_master_cmd *cmd);