diff options
author | Nico Huber <nico.h@gmx.de> | 2020-04-05 13:55:12 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2020-04-10 11:25:04 +0000 |
commit | a461b694a6c0468cd679628aeebf83437027fb45 (patch) | |
tree | 6ba4647074e37d7580ab85683c8aa40358246e4c /src/drivers | |
parent | 9734325f4568c19d1ffc392084aa431a810a0709 (diff) |
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')
32 files changed, 0 insertions, 34 deletions
diff --git a/src/drivers/generic/adau7002/adau7002.c b/src/drivers/generic/adau7002/adau7002.c index d026ffd344..97bd37d871 100644 --- a/src/drivers/generic/adau7002/adau7002.c +++ b/src/drivers/generic/adau7002/adau7002.c @@ -57,7 +57,6 @@ static const char *adau7002_acpi_name(const struct device *dev) static struct device_operations adau7002_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, - .enable_resources = DEVICE_NOOP, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = adau7002_acpi_name, .acpi_fill_ssdt = adau7002_fill_ssdt, diff --git a/src/drivers/generic/generic/generic.c b/src/drivers/generic/generic/generic.c index 5666ee4157..d4de6c7583 100644 --- a/src/drivers/generic/generic/generic.c +++ b/src/drivers/generic/generic/generic.c @@ -70,7 +70,6 @@ static const char *generic_dev_acpi_name(const struct device *dev) static struct device_operations generic_dev_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, - .enable_resources = DEVICE_NOOP, .acpi_name = generic_dev_acpi_name, .acpi_fill_ssdt = generic_dev_fill_ssdt_generator, }; diff --git a/src/drivers/generic/gpio_keys/gpio_keys.c b/src/drivers/generic/gpio_keys/gpio_keys.c index e2310a1c31..5a74c6409b 100644 --- a/src/drivers/generic/gpio_keys/gpio_keys.c +++ b/src/drivers/generic/gpio_keys/gpio_keys.c @@ -104,7 +104,6 @@ static const char *gpio_keys_acpi_name(const struct device *dev) static struct device_operations gpio_keys_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, - .enable_resources = DEVICE_NOOP, .acpi_name = gpio_keys_acpi_name, .acpi_fill_ssdt = gpio_keys_fill_ssdt_generator, }; diff --git a/src/drivers/generic/gpio_regulator/gpio_regulator.c b/src/drivers/generic/gpio_regulator/gpio_regulator.c index 253a2fa633..7041aa0e7c 100644 --- a/src/drivers/generic/gpio_regulator/gpio_regulator.c +++ b/src/drivers/generic/gpio_regulator/gpio_regulator.c @@ -61,7 +61,6 @@ static const char *gpio_regulator_acpi_name(const struct device *dev) static struct device_operations gpio_regulator_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, - .enable_resources = DEVICE_NOOP, .acpi_name = gpio_regulator_acpi_name, .acpi_fill_ssdt = gpio_regulator_fill_ssdt_generator, }; diff --git a/src/drivers/generic/ioapic/ioapic.c b/src/drivers/generic/ioapic/ioapic.c index b09e8a6c04..b2c4bb60b1 100644 --- a/src/drivers/generic/ioapic/ioapic.c +++ b/src/drivers/generic/ioapic/ioapic.c @@ -96,7 +96,6 @@ static void ioapic_read_resources(struct device *dev) static struct device_operations ioapic_operations = { .read_resources = ioapic_read_resources, .set_resources = DEVICE_NOOP, - .enable_resources = DEVICE_NOOP, .init = ioapic_init, }; diff --git a/src/drivers/generic/max98357a/max98357a.c b/src/drivers/generic/max98357a/max98357a.c index d1c4978398..0a29367498 100644 --- a/src/drivers/generic/max98357a/max98357a.c +++ b/src/drivers/generic/max98357a/max98357a.c @@ -72,7 +72,6 @@ static const char *max98357a_acpi_name(const struct device *dev) static struct device_operations max98357a_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, - .enable_resources = DEVICE_NOOP, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = max98357a_acpi_name, .acpi_fill_ssdt = max98357a_fill_ssdt, 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, }; diff --git a/src/drivers/intel/ish/ish.c b/src/drivers/intel/ish/ish.c index d7740a4d6f..66e232d51a 100644 --- a/src/drivers/intel/ish/ish.c +++ b/src/drivers/intel/ish/ish.c @@ -32,7 +32,6 @@ static void ish_fill_ssdt_generator(struct device *dev) static struct device_operations intel_ish_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, - .enable_resources = DEVICE_NOOP, .acpi_fill_ssdt = ish_fill_ssdt_generator, }; diff --git a/src/drivers/intel/mipi_camera/camera.c b/src/drivers/intel/mipi_camera/camera.c index 0d8c10e7ae..41a6eb588e 100644 --- a/src/drivers/intel/mipi_camera/camera.c +++ b/src/drivers/intel/mipi_camera/camera.c @@ -70,7 +70,6 @@ static const char *camera_acpi_name(const struct device *dev) static struct device_operations camera_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, - .enable_resources = DEVICE_NOOP, .acpi_name = camera_acpi_name, .acpi_fill_ssdt = camera_fill_ssdt, }; diff --git a/src/drivers/ipmi/ipmi_kcs_ops.c b/src/drivers/ipmi/ipmi_kcs_ops.c index 2ab137e937..7f39135d6d 100644 --- a/src/drivers/ipmi/ipmi_kcs_ops.c +++ b/src/drivers/ipmi/ipmi_kcs_ops.c @@ -347,7 +347,6 @@ static void ipmi_read_resources(struct device *dev) static struct device_operations ops = { .read_resources = ipmi_read_resources, .set_resources = ipmi_set_resources, - .enable_resources = DEVICE_NOOP, .init = ipmi_kcs_init, #if CONFIG(HAVE_ACPI_TABLES) .write_acpi_tables = ipmi_write_acpi_tables, diff --git a/src/drivers/spi/acpi/acpi.c b/src/drivers/spi/acpi/acpi.c index fc5feea860..ebdd4099fa 100644 --- a/src/drivers/spi/acpi/acpi.c +++ b/src/drivers/spi/acpi/acpi.c @@ -192,7 +192,6 @@ static const char *spi_acpi_name(const struct device *dev) static struct device_operations spi_acpi_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, - .enable_resources = DEVICE_NOOP, .acpi_name = spi_acpi_name, .acpi_fill_ssdt = spi_acpi_fill_ssdt_generator, }; diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c index d6dc46f180..13f37fa4e2 100644 --- a/src/drivers/usb/acpi/usb_acpi.c +++ b/src/drivers/usb/acpi/usb_acpi.c @@ -72,7 +72,6 @@ static void usb_acpi_fill_ssdt_generator(struct device *dev) static struct device_operations usb_acpi_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, - .enable_resources = DEVICE_NOOP, .scan_bus = scan_static_bus, .acpi_fill_ssdt = usb_acpi_fill_ssdt_generator, }; |