diff mbox

[09/18] mmc: meson-gx: change interrupt name

Message ID cbe84305-803a-5431-9246-0b30d6f135b0@gmail.com (mailing list archive)
State Superseded
Headers show

Commit Message

Heiner Kallweit Feb. 14, 2017, 8:06 p.m. UTC
So far the driver name is used for the interrupt. Therefore in
/proc/interrupts we can't tell which interrupt belongs to which
SD_EMMC port.
So let's use the device name instead (what is the OF node name).

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/mmc/host/meson-gx-mmc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Ben Dooks Feb. 15, 2017, 12:34 p.m. UTC | #1
On 14/02/17 20:06, Heiner Kallweit wrote:
> So far the driver name is used for the interrupt. Therefore in
> /proc/interrupts we can't tell which interrupt belongs to which
> SD_EMMC port.
> So let's use the device name instead (what is the OF node name).
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
>  drivers/mmc/host/meson-gx-mmc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
> index a67c811e..1a76c925 100644
> --- a/drivers/mmc/host/meson-gx-mmc.c
> +++ b/drivers/mmc/host/meson-gx-mmc.c
> @@ -757,9 +757,9 @@ static int meson_mmc_probe(struct platform_device *pdev)
>  	writel(IRQ_EN_MASK, host->regs + SD_EMMC_STATUS);
>  	writel(IRQ_EN_MASK, host->regs + SD_EMMC_IRQ_EN);
>
> -	ret = devm_request_threaded_irq(&pdev->dev, host->irq,
> -					meson_mmc_irq, meson_mmc_irq_thread,
> -					IRQF_SHARED, DRIVER_NAME, host);
> +	ret = devm_request_threaded_irq(&pdev->dev, host->irq, meson_mmc_irq,
> +					meson_mmc_irq_thread, IRQF_SHARED,
> +					dev_name(&pdev->dev), host);
>  	if (ret)
>  		goto free_host;
>

I am surpised that the default is not to use dev_name(dev), I wonder if
that should be something that devm_request_threaded_irq() could be
updated to do.
Kevin Hilman Feb. 15, 2017, 5:18 p.m. UTC | #2
Heiner Kallweit <hkallweit1@gmail.com> writes:

> So far the driver name is used for the interrupt. Therefore in
> /proc/interrupts we can't tell which interrupt belongs to which
> SD_EMMC port.
> So let's use the device name instead (what is the OF node name).
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Acked-by: Kevin Hilman <khilman@baylibre.com>

> ---
>  drivers/mmc/host/meson-gx-mmc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
> index a67c811e..1a76c925 100644
> --- a/drivers/mmc/host/meson-gx-mmc.c
> +++ b/drivers/mmc/host/meson-gx-mmc.c
> @@ -757,9 +757,9 @@ static int meson_mmc_probe(struct platform_device *pdev)
>  	writel(IRQ_EN_MASK, host->regs + SD_EMMC_STATUS);
>  	writel(IRQ_EN_MASK, host->regs + SD_EMMC_IRQ_EN);
>  
> -	ret = devm_request_threaded_irq(&pdev->dev, host->irq,
> -					meson_mmc_irq, meson_mmc_irq_thread,
> -					IRQF_SHARED, DRIVER_NAME, host);
> +	ret = devm_request_threaded_irq(&pdev->dev, host->irq, meson_mmc_irq,
> +					meson_mmc_irq_thread, IRQF_SHARED,
> +					dev_name(&pdev->dev), host);
>  	if (ret)
>  		goto free_host;
Heiner Kallweit Feb. 15, 2017, 7:46 p.m. UTC | #3
Am 15.02.2017 um 13:34 schrieb Ben Dooks:
> On 14/02/17 20:06, Heiner Kallweit wrote:
>> So far the driver name is used for the interrupt. Therefore in
>> /proc/interrupts we can't tell which interrupt belongs to which
>> SD_EMMC port.
>> So let's use the device name instead (what is the OF node name).
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>> ---
>>  drivers/mmc/host/meson-gx-mmc.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
>> index a67c811e..1a76c925 100644
>> --- a/drivers/mmc/host/meson-gx-mmc.c
>> +++ b/drivers/mmc/host/meson-gx-mmc.c
>> @@ -757,9 +757,9 @@ static int meson_mmc_probe(struct platform_device *pdev)
>>      writel(IRQ_EN_MASK, host->regs + SD_EMMC_STATUS);
>>      writel(IRQ_EN_MASK, host->regs + SD_EMMC_IRQ_EN);
>>
>> -    ret = devm_request_threaded_irq(&pdev->dev, host->irq,
>> -                    meson_mmc_irq, meson_mmc_irq_thread,
>> -                    IRQF_SHARED, DRIVER_NAME, host);
>> +    ret = devm_request_threaded_irq(&pdev->dev, host->irq, meson_mmc_irq,
>> +                    meson_mmc_irq_thread, IRQF_SHARED,
>> +                    dev_name(&pdev->dev), host);
>>      if (ret)
>>          goto free_host;
>>
> 
> I am surpised that the default is not to use dev_name(dev), I wonder if
> that should be something that devm_request_threaded_irq() could be
> updated to do.
> 
I asked myself the same question and submitted a patch:
https://lkml.org/lkml/2017/2/12/80

>
diff mbox

Patch

diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index a67c811e..1a76c925 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -757,9 +757,9 @@  static int meson_mmc_probe(struct platform_device *pdev)
 	writel(IRQ_EN_MASK, host->regs + SD_EMMC_STATUS);
 	writel(IRQ_EN_MASK, host->regs + SD_EMMC_IRQ_EN);
 
-	ret = devm_request_threaded_irq(&pdev->dev, host->irq,
-					meson_mmc_irq, meson_mmc_irq_thread,
-					IRQF_SHARED, DRIVER_NAME, host);
+	ret = devm_request_threaded_irq(&pdev->dev, host->irq, meson_mmc_irq,
+					meson_mmc_irq_thread, IRQF_SHARED,
+					dev_name(&pdev->dev), host);
 	if (ret)
 		goto free_host;