[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALAqxLVZ+rFE+hM9OtQ46NqpTHeLu6oKLNWKstLv1U5zbwyq7g@mail.gmail.com>
Date: Wed, 5 Aug 2020 00:44:21 -0700
From: John Stultz <john.stultz@...aro.org>
To: Saravana Kannan <saravanak@...gle.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Marc Zyngier <maz@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Android Kernel Team <kernel-team@...roid.com>,
lkml <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
linux-mediatek@...ts.infradead.org,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Hanks Chen <hanks.chen@...iatek.com>,
CC Hwang <cc.hwang@...iatek.com>,
Loda Chou <loda.chou@...iatek.com>
Subject: Re: [PATCH v3 2/4] irqchip/qcom-pdc: Switch to using
IRQCHIP_PLATFORM_DRIVER helper macros
On Fri, Jul 17, 2020 at 5:06 PM Saravana Kannan <saravanak@...gle.com> wrote:
>
> Switch the driver to use the helper macros. In addition to reducing the
> number of lines, this also adds module unload protection (if the driver
> is compiled as a module) by switching from module_platform_driver to
> builtin_platform_driver.
>
> Signed-off-by: Saravana Kannan <saravanak@...gle.com>
> ---
> drivers/irqchip/qcom-pdc.c | 26 +++-----------------------
> 1 file changed, 3 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c
> index 5b624e3295e4..c1c5dfad57cc 100644
> --- a/drivers/irqchip/qcom-pdc.c
> +++ b/drivers/irqchip/qcom-pdc.c
> @@ -432,28 +432,8 @@ static int qcom_pdc_init(struct device_node *node, struct device_node *parent)
> return ret;
> }
>
> -static int qcom_pdc_probe(struct platform_device *pdev)
> -{
> - struct device_node *np = pdev->dev.of_node;
> - struct device_node *parent = of_irq_find_parent(np);
> -
> - return qcom_pdc_init(np, parent);
> -}
> -
> -static const struct of_device_id qcom_pdc_match_table[] = {
> - { .compatible = "qcom,pdc" },
> - {}
> -};
> -MODULE_DEVICE_TABLE(of, qcom_pdc_match_table);
> -
> -static struct platform_driver qcom_pdc_driver = {
> - .probe = qcom_pdc_probe,
> - .driver = {
> - .name = "qcom-pdc",
> - .of_match_table = qcom_pdc_match_table,
> - .suppress_bind_attrs = true,
> - },
> -};
> -module_platform_driver(qcom_pdc_driver);
> +IRQCHIP_PLATFORM_DRIVER_BEGIN(qcom_pdc)
> +IRQCHIP_MATCH("qcom,pdc", qcom_pdc_init)
> +IRQCHIP_PLATFORM_DRIVER_END(qcom_pdc)
> MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Power Domain Controller");
> MODULE_LICENSE("GPL v2");
<sigh>
So this is where I bashfully admit I didn't get a chance to try this
patch series out, as I had success with a much older version of
Saravana's macro magic.
But unfortunately, now that this has landed in mainline, I'm seeing
boot regressions on db845c. :( This is in the non-modular case,
building the driver in.
I managed to bisect it down to this patch, and reverting it avoids the
issue. I don't see what is wrong right off, but I really need to get
to bed, so I'll dig further tomorrow.
Saravana: Apologies for not getting around to testing this beforehand!
thanks
-john
Powered by blists - more mailing lists