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>
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
};
|
||||
|
@@ -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)
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -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
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user