Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: eeprom: at2x: streamline codebase #80660

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions drivers/eeprom/eeprom_at2x.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@ static int eeprom_at25_read(const struct device *dev, off_t offset, void *buf,
size_t len)
{
const struct eeprom_at2x_config *config = dev->config;
struct eeprom_at2x_data *data = dev->data;
size_t cmd_len = 1 + config->addr_width / 8;
uint8_t cmd[4] = { EEPROM_AT25_READ, 0, 0, 0 };
uint8_t *paddr;
Expand Down Expand Up @@ -474,7 +473,6 @@ static int eeprom_at25_read(const struct device *dev, off_t offset, void *buf,
err = eeprom_at25_wait_for_idle(dev);
if (err) {
LOG_ERR("EEPROM idle wait failed (err %d)", err);
k_mutex_unlock(&data->lock);
return err;
}

Expand Down Expand Up @@ -648,7 +646,7 @@ static const struct eeprom_driver_api eeprom_at2x_api = {
.write_fn = eeprom_at##t##_write, \
}; \
static struct eeprom_at2x_data eeprom_at##t##_data_##n; \
DEVICE_DT_DEFINE(INST_DT_AT2X(n, t), &eeprom_at2x_init, \
DEVICE_DT_DEFINE(INST_DT_AT2X(n, t), eeprom_at2x_init, \
NULL, &eeprom_at##t##_data_##n, \
&eeprom_at##t##_config_##n, POST_KERNEL, \
CONFIG_EEPROM_AT2X_INIT_PRIORITY, \
Expand Down
Loading