Skip to content

Commit

Permalink
drivers: adc: ads1112: Remove unused variables
Browse files Browse the repository at this point in the history
Remove unused variables for suppress warnings

Signed-off-by: TOKITA Hiroshi <[email protected]>
  • Loading branch information
soburi committed Sep 17, 2024
1 parent b22873a commit c023ef2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/adc/adc_ads1112.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ static int ads1112_read_sample(const struct device *dev, uint16_t *buff)
{
int res;
uint8_t sample[2] = {0};
const struct ads1112_config *config = dev->config;

res = ads1112_read_reg(dev, ADS1112_REG_OUTPUT, sample);
buff[0] = sys_get_be16(sample);
Expand Down Expand Up @@ -263,8 +262,6 @@ static int ads1112_validate_buffer_size(const struct adc_sequence *sequence)

static int ads1112_validate_sequence(const struct device *dev, const struct adc_sequence *sequence)
{
const struct ads1112_data *data = dev->data;

if (sequence->channels != BIT(0)) {
LOG_ERR("Invalid Channel 0x%x", sequence->channels);
return -EINVAL;
Expand Down Expand Up @@ -360,9 +357,8 @@ static int ads1112_read(const struct device *dev, const struct adc_sequence *seq
static int ads1112_init(const struct device *dev)
{
int rc = 0;
uint8_t status;
const struct ads1112_config *config = dev->config;
struct ads1112_data *data = dev->data;
const struct ads1112_config *config = dev->config;

adc_context_init(&data->ctx);

Expand Down

0 comments on commit c023ef2

Please sign in to comment.