public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kunwu Chan <kunwu.chan@linux.dev>
To: Rob Herring <robh@kernel.org>
Cc: saravanak@google.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Kunwu Chan <chentao@kylinos.cn>
Subject: Re: [PATCH] of/platform: Use dev_is_platform() to identify PCI devices
Date: Thu, 29 Aug 2024 09:37:08 +0800	[thread overview]
Message-ID: <17b227d7-431a-4970-aec5-a0bd986d662a@linux.dev> (raw)
In-Reply-To: <20240828150826.GA3803566-robh@kernel.org>

Thanks for the reply.
On 2024/8/28 23:08, Rob Herring wrote:
> On Tue, Aug 27, 2024 at 05:44:02PM +0800, Kunwu Chan wrote:
>> From: Kunwu Chan <chentao@kylinos.cn>
> Subject - For PCI devices?
My bad, i'll change it in v2.
>> Use dev_is_platform() instead of checking bus type directly.
>>
>> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
>> ---
>>   drivers/of/platform.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
>> index 86be4dfb9323..3696140bae9e 100644
>> --- a/drivers/of/platform.c
>> +++ b/drivers/of/platform.c
>> @@ -625,7 +625,7 @@ int of_platform_device_destroy(struct device *dev, void *data)
>>   	of_node_clear_flag(dev->of_node, OF_POPULATED);
>>   	of_node_clear_flag(dev->of_node, OF_POPULATED_BUS);
>>   
>> -	if (dev->bus == &platform_bus_type)
>> +	if (dev_is_platform(dev))
>>   		platform_device_unregister(to_platform_device(dev));
>>   #ifdef CONFIG_ARM_AMBA
>>   	else if (dev->bus == &amba_bustype)
> Perhaps to keep things consistent, add a dev_is_amba() and use it here.
>
Sure, i'am doing this in [1], i'll send the v2 patch after change it in 
AMBA.

[1] https://lore.kernel.org/all/ZsiTPjtnZZIW-K4k@smile.fi.intel.com/

>> -- 
>> 2.41.0
>>
-- 
Thanks,
   Kunwu.Chan


      reply	other threads:[~2024-08-29  1:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27  9:44 [PATCH] of/platform: Use dev_is_platform() to identify PCI devices Kunwu Chan
2024-08-28 15:08 ` Rob Herring
2024-08-29  1:37   ` Kunwu Chan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17b227d7-431a-4970-aec5-a0bd986d662a@linux.dev \
    --to=kunwu.chan@linux.dev \
    --cc=chentao@kylinos.cn \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=saravanak@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox