--- zzzz-none-000/linux-4.4.271/drivers/gpio/gpio-mcp23s08.c 2021-06-03 06:22:09.000000000 +0000 +++ maple-fsgw-759/linux-4.4.271/drivers/gpio/gpio-mcp23s08.c 2023-12-20 10:37:08.000000000 +0000 @@ -446,7 +446,7 @@ struct mcp23s08 *mcp = irq_data_get_irq_chip_data(data); if (gpiochip_lock_as_irq(&mcp->chip, data->hwirq)) { - dev_err(mcp->chip.dev, + dev_err(mcp->chip.parent, "unable to lock HW IRQ %lu for IRQ usage\n", data->hwirq); return -EINVAL; @@ -481,7 +481,8 @@ mutex_init(&mcp->irq_lock); - mcp->irq_domain = irq_domain_add_linear(chip->dev->of_node, chip->ngpio, + mcp->irq_domain = irq_domain_add_linear(chip->parent->of_node, + chip->ngpio, &irq_domain_simple_ops, mcp); if (!mcp->irq_domain) return -ENODEV; @@ -491,10 +492,11 @@ else irqflags |= IRQF_TRIGGER_LOW; - err = devm_request_threaded_irq(chip->dev, mcp->irq, NULL, mcp23s08_irq, - irqflags, dev_name(chip->dev), mcp); + err = devm_request_threaded_irq(chip->parent, mcp->irq, NULL, + mcp23s08_irq, + irqflags, dev_name(chip->parent), mcp); if (err != 0) { - dev_err(chip->dev, "unable to request IRQ#%d: %d\n", + dev_err(chip->parent, "unable to request IRQ#%d: %d\n", mcp->irq, err); return err; } @@ -638,7 +640,7 @@ mcp->chip.base = pdata->base; mcp->chip.can_sleep = true; - mcp->chip.dev = dev; + mcp->chip.parent = dev; mcp->chip.owner = THIS_MODULE; /* verify MCP_IOCON.SEQOP = 0, so sequential reads work, @@ -652,7 +654,7 @@ mcp->irq_controller = pdata->irq_controller; if (mcp->irq && mcp->irq_controller) { mcp->irq_active_high = - of_property_read_bool(mcp->chip.dev->of_node, + of_property_read_bool(mcp->chip.parent->of_node, "microchip,irq-active-high"); if (type == MCP_TYPE_017)