summaryrefslogtreecommitdiff
path: root/src/drivers/i2c
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2020-04-05 13:55:12 +0200
committerNico Huber <nico.h@gmx.de>2020-04-10 11:25:04 +0000
commita461b694a6c0468cd679628aeebf83437027fb45 (patch)
tree6ba4647074e37d7580ab85683c8aa40358246e4c /src/drivers/i2c
parent9734325f4568c19d1ffc392084aa431a810a0709 (diff)
downloadcoreboot-a461b694a6c0468cd679628aeebf83437027fb45.tar.xz
Drop unnecessary DEVICE_NOOP entries
Providing an explicit no-op function pointer is only necessary for `.read_resources` and `.set_resources`. All other device-operation pointers are optional and can be NULL. Change-Id: I3d139f7be86180558cabec04b8566873062e33be Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40206 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/i2c')
-rw-r--r--src/drivers/i2c/adt7463/adt7463.c1
-rw-r--r--src/drivers/i2c/at24rf08c/at24rf08c.c1
-rw-r--r--src/drivers/i2c/ck505/ck505.c1
-rw-r--r--src/drivers/i2c/da7219/da7219.c1
-rw-r--r--src/drivers/i2c/generic/generic.c1
-rw-r--r--src/drivers/i2c/hid/hid.c1
-rw-r--r--src/drivers/i2c/lm96000/lm96000.c1
-rw-r--r--src/drivers/i2c/max98373/max98373.c1
-rw-r--r--src/drivers/i2c/max98927/max98927.c1
-rw-r--r--src/drivers/i2c/nau8825/nau8825.c1
-rw-r--r--src/drivers/i2c/nct7802y/nct7802y.c1
-rw-r--r--src/drivers/i2c/pca9538/pca9538.c2
-rw-r--r--src/drivers/i2c/pcf8523/pcf8523.c1
-rw-r--r--src/drivers/i2c/ptn3460/ptn3460.c2
-rw-r--r--src/drivers/i2c/rt1011/rt1011.c1
-rw-r--r--src/drivers/i2c/rt5663/rt5663.c1
-rw-r--r--src/drivers/i2c/rtd2132/rtd2132.c1
-rw-r--r--src/drivers/i2c/rx6110sa/rx6110sa.c1
-rw-r--r--src/drivers/i2c/sx9310/sx9310.c1
-rw-r--r--src/drivers/i2c/tpm/chip.c1
-rw-r--r--src/drivers/i2c/w83793/w83793.c1
21 files changed, 0 insertions, 23 deletions
diff --git a/src/drivers/i2c/adt7463/adt7463.c b/src/drivers/i2c/adt7463/adt7463.c
index d1c5819c21..3e1a3a5859 100644
--- a/src/drivers/i2c/adt7463/adt7463.c
+++ b/src/drivers/i2c/adt7463/adt7463.c
@@ -80,7 +80,6 @@ static void adt7463_init(struct device *adt7463)
static struct device_operations adt7463_operations = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = adt7463_init,
};
diff --git a/src/drivers/i2c/at24rf08c/at24rf08c.c b/src/drivers/i2c/at24rf08c/at24rf08c.c
index 32f702c497..3841d64fd6 100644
--- a/src/drivers/i2c/at24rf08c/at24rf08c.c
+++ b/src/drivers/i2c/at24rf08c/at24rf08c.c
@@ -35,7 +35,6 @@ static void at24rf08c_init(struct device *dev)
static struct device_operations at24rf08c_operations = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = at24rf08c_init,
};
diff --git a/src/drivers/i2c/ck505/ck505.c b/src/drivers/i2c/ck505/ck505.c
index 23fba474f1..fac5208577 100644
--- a/src/drivers/i2c/ck505/ck505.c
+++ b/src/drivers/i2c/ck505/ck505.c
@@ -48,7 +48,6 @@ static void ck505_init(struct device *dev)
static struct device_operations ck505_operations = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = ck505_init,
};
diff --git a/src/drivers/i2c/da7219/da7219.c b/src/drivers/i2c/da7219/da7219.c
index eea82ba148..43c6f9d41b 100644
--- a/src/drivers/i2c/da7219/da7219.c
+++ b/src/drivers/i2c/da7219/da7219.c
@@ -100,7 +100,6 @@ static const char *da7219_acpi_name(const struct device *dev)
static struct device_operations da7219_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_name = da7219_acpi_name,
.acpi_fill_ssdt = da7219_fill_ssdt,
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c
index 3e9da75395..32b984a85f 100644
--- a/src/drivers/i2c/generic/generic.c
+++ b/src/drivers/i2c/generic/generic.c
@@ -182,7 +182,6 @@ static const char *i2c_generic_acpi_name(const struct device *dev)
static struct device_operations i2c_generic_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_name = i2c_generic_acpi_name,
.acpi_fill_ssdt = i2c_generic_fill_ssdt_generator,
diff --git a/src/drivers/i2c/hid/hid.c b/src/drivers/i2c/hid/hid.c
index 8a3acf948a..11d9d18298 100644
--- a/src/drivers/i2c/hid/hid.c
+++ b/src/drivers/i2c/hid/hid.c
@@ -39,7 +39,6 @@ static const char *i2c_hid_acpi_name(const struct device *dev)
static struct device_operations i2c_hid_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_name = i2c_hid_acpi_name,
.acpi_fill_ssdt = i2c_hid_fill_ssdt_generator,
diff --git a/src/drivers/i2c/lm96000/lm96000.c b/src/drivers/i2c/lm96000/lm96000.c
index dcb5b41f9c..54d2b88e7c 100644
--- a/src/drivers/i2c/lm96000/lm96000.c
+++ b/src/drivers/i2c/lm96000/lm96000.c
@@ -207,7 +207,6 @@ static void lm96000_init(struct device *const dev)
static struct device_operations lm96000_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = lm96000_init,
};
diff --git a/src/drivers/i2c/max98373/max98373.c b/src/drivers/i2c/max98373/max98373.c
index 257156b0f4..c6fa2e48d4 100644
--- a/src/drivers/i2c/max98373/max98373.c
+++ b/src/drivers/i2c/max98373/max98373.c
@@ -77,7 +77,6 @@ static const char *max98373_acpi_name(const struct device *dev)
static struct device_operations max98373_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.acpi_name = max98373_acpi_name,
.acpi_fill_ssdt = max98373_fill_ssdt,
};
diff --git a/src/drivers/i2c/max98927/max98927.c b/src/drivers/i2c/max98927/max98927.c
index f84e8d5197..166a4ef87b 100644
--- a/src/drivers/i2c/max98927/max98927.c
+++ b/src/drivers/i2c/max98927/max98927.c
@@ -73,7 +73,6 @@ static const char *max98927_acpi_name(const struct device *dev)
static struct device_operations max98927_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.acpi_name = max98927_acpi_name,
.acpi_fill_ssdt = max98927_fill_ssdt,
};
diff --git a/src/drivers/i2c/nau8825/nau8825.c b/src/drivers/i2c/nau8825/nau8825.c
index 5f5b4d526a..0c893a44cb 100644
--- a/src/drivers/i2c/nau8825/nau8825.c
+++ b/src/drivers/i2c/nau8825/nau8825.c
@@ -88,7 +88,6 @@ static const char *nau8825_acpi_name(const struct device *dev)
static struct device_operations nau8825_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_name = nau8825_acpi_name,
.acpi_fill_ssdt = nau8825_fill_ssdt,
diff --git a/src/drivers/i2c/nct7802y/nct7802y.c b/src/drivers/i2c/nct7802y/nct7802y.c
index da148092d4..c21b002ba5 100644
--- a/src/drivers/i2c/nct7802y/nct7802y.c
+++ b/src/drivers/i2c/nct7802y/nct7802y.c
@@ -22,7 +22,6 @@ static void nct7802y_init(struct device *const dev)
static struct device_operations nct7802y_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = nct7802y_init,
};
diff --git a/src/drivers/i2c/pca9538/pca9538.c b/src/drivers/i2c/pca9538/pca9538.c
index 50f634e055..68283b8006 100644
--- a/src/drivers/i2c/pca9538/pca9538.c
+++ b/src/drivers/i2c/pca9538/pca9538.c
@@ -41,9 +41,7 @@ static void pca9538_init(struct device *dev)
static struct device_operations pca9538_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = pca9538_init,
- .final = DEVICE_NOOP
};
static void pca9538_enable(struct device *dev)
diff --git a/src/drivers/i2c/pcf8523/pcf8523.c b/src/drivers/i2c/pcf8523/pcf8523.c
index 3e6af7541c..82945ffe2b 100644
--- a/src/drivers/i2c/pcf8523/pcf8523.c
+++ b/src/drivers/i2c/pcf8523/pcf8523.c
@@ -120,7 +120,6 @@ static void pcf8523_init(struct device *dev)
static struct device_operations pcf8523c_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = pcf8523_init,
.final = pcf8523_final
};
diff --git a/src/drivers/i2c/ptn3460/ptn3460.c b/src/drivers/i2c/ptn3460/ptn3460.c
index c4b8f12857..7b3bb56596 100644
--- a/src/drivers/i2c/ptn3460/ptn3460.c
+++ b/src/drivers/i2c/ptn3460/ptn3460.c
@@ -129,9 +129,7 @@ __weak int mb_adjust_cfg(struct ptn_3460_config *cfg_ptr)
static struct device_operations ptn3460_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = ptn3460_init,
- .final = DEVICE_NOOP
};
static void ptn3460_enable(struct device *dev)
diff --git a/src/drivers/i2c/rt1011/rt1011.c b/src/drivers/i2c/rt1011/rt1011.c
index dc8410fda9..19ee1f2c22 100644
--- a/src/drivers/i2c/rt1011/rt1011.c
+++ b/src/drivers/i2c/rt1011/rt1011.c
@@ -86,7 +86,6 @@ static const char *rt1011_acpi_name(const struct device *dev)
static struct device_operations rt1011_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.acpi_name = rt1011_acpi_name,
.acpi_fill_ssdt = rt1011_fill_ssdt,
};
diff --git a/src/drivers/i2c/rt5663/rt5663.c b/src/drivers/i2c/rt5663/rt5663.c
index f6d023d522..0e4bab03cc 100644
--- a/src/drivers/i2c/rt5663/rt5663.c
+++ b/src/drivers/i2c/rt5663/rt5663.c
@@ -77,7 +77,6 @@ static const char *rt5663_acpi_name(const struct device *dev)
static struct device_operations rt5663_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.acpi_name = rt5663_acpi_name,
.acpi_fill_ssdt = rt5663_fill_ssdt,
};
diff --git a/src/drivers/i2c/rtd2132/rtd2132.c b/src/drivers/i2c/rtd2132/rtd2132.c
index 2cefe6b7da..5dffdc8000 100644
--- a/src/drivers/i2c/rtd2132/rtd2132.c
+++ b/src/drivers/i2c/rtd2132/rtd2132.c
@@ -227,7 +227,6 @@ static void rtd2132_init(struct device *dev)
static struct device_operations rtd2132_operations = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = rtd2132_init,
};
diff --git a/src/drivers/i2c/rx6110sa/rx6110sa.c b/src/drivers/i2c/rx6110sa/rx6110sa.c
index e9abe6266f..c691965f9d 100644
--- a/src/drivers/i2c/rx6110sa/rx6110sa.c
+++ b/src/drivers/i2c/rx6110sa/rx6110sa.c
@@ -167,7 +167,6 @@ static void rx6110sa_init(struct device *dev)
static struct device_operations rx6110sa_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = rx6110sa_init,
.final = rx6110sa_final
};
diff --git a/src/drivers/i2c/sx9310/sx9310.c b/src/drivers/i2c/sx9310/sx9310.c
index 5524395010..e1fe104fe8 100644
--- a/src/drivers/i2c/sx9310/sx9310.c
+++ b/src/drivers/i2c/sx9310/sx9310.c
@@ -81,7 +81,6 @@ static const char *i2c_sx9310_acpi_name(const struct device *dev)
static struct device_operations i2c_sx9310_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.acpi_name = i2c_sx9310_acpi_name,
.acpi_fill_ssdt = i2c_sx9310_fill_ssdt,
};
diff --git a/src/drivers/i2c/tpm/chip.c b/src/drivers/i2c/tpm/chip.c
index 2373069437..eeccb7d30d 100644
--- a/src/drivers/i2c/tpm/chip.c
+++ b/src/drivers/i2c/tpm/chip.c
@@ -64,7 +64,6 @@ static const char *i2c_tpm_acpi_name(const struct device *dev)
static struct device_operations i2c_tpm_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.acpi_name = i2c_tpm_acpi_name,
.acpi_fill_ssdt = i2c_tpm_fill_ssdt,
};
diff --git a/src/drivers/i2c/w83793/w83793.c b/src/drivers/i2c/w83793/w83793.c
index 8cf5d87b20..c52cbb24da 100644
--- a/src/drivers/i2c/w83793/w83793.c
+++ b/src/drivers/i2c/w83793/w83793.c
@@ -294,7 +294,6 @@ static void w83793_init(struct device *dev)
static struct device_operations w83793_operations = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = w83793_init,
};