Skip to content

Commit

Permalink
mfd: intel_quark_i2c_gpio: Revert "Constify static struct resources"
Browse files Browse the repository at this point in the history
The structures are used as place holders, so they are modified at run-time.
Obviously they may not be constants.

  BUG: unable to handle page fault for address: d0643220
  ...
  CPU: 0 PID: 110 Comm: modprobe Not tainted 5.11.0+ #1
  Hardware name: Intel Corp. QUARK/GalileoGen2, BIOS 0x01000200 01/01/2014
  EIP: intel_quark_mfd_probe+0x93/0x1c0 [intel_quark_i2c_gpio]

This partially reverts the commit c4a164f.

While at it, add a comment to avoid similar changes in the future.

Fixes: c4a164f ("mfd: Constify static struct resources")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Tested-by: Tong Zhang <ztong0001@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
andy-shev authored and Lee Jones committed Mar 23, 2021
1 parent a38fd87 commit a61f466
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/mfd/intel_quark_i2c_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ static const struct dmi_system_id dmi_platform_info[] = {
{}
};

static const struct resource intel_quark_i2c_res[] = {
/* This is used as a place holder and will be modified at run-time */
static struct resource intel_quark_i2c_res[] = {
[INTEL_QUARK_IORES_MEM] = {
.flags = IORESOURCE_MEM,
},
Expand All @@ -85,7 +86,8 @@ static struct mfd_cell_acpi_match intel_quark_acpi_match_i2c = {
.adr = MFD_ACPI_MATCH_I2C,
};

static const struct resource intel_quark_gpio_res[] = {
/* This is used as a place holder and will be modified at run-time */
static struct resource intel_quark_gpio_res[] = {
[INTEL_QUARK_IORES_MEM] = {
.flags = IORESOURCE_MEM,
},
Expand Down

0 comments on commit a61f466

Please sign in to comment.