mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Daniel Tang <danielzgtg.opensource@gmail.com>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH] acpi: TAD: Add missing sysfs_remove_group for ACPI_TAD_RT
Date: Thu, 28 Aug 2025 07:12:03 +0200	[thread overview]
Message-ID: <20250828051203.GU476609@black.igk.intel.com> (raw)
In-Reply-To: <7674021.TlGXAFRqVo@daniel-desktop3>

On Wed, Aug 27, 2025 at 06:51:41PM -0400, Daniel Tang wrote:
> Previously, after `rmmod acpi_tad`, `modprobe acpi_tad` would fail
> with this dmesg:
> 
> sysfs: cannot create duplicate filename '/devices/platform/ACPI000E:00/time'
> Call Trace:
>  <TASK>
>  dump_stack_lvl+0x6c/0x90
>  dump_stack+0x10/0x20
>  sysfs_warn_dup+0x8b/0xa0
>  sysfs_add_file_mode_ns+0x122/0x130
>  internal_create_group+0x1dd/0x4c0
>  sysfs_create_group+0x13/0x20
>  acpi_tad_probe+0x147/0x1f0 [acpi_tad]
>  platform_probe+0x42/0xb0
>  </TASK>
> acpi-tad ACPI000E:00: probe with driver acpi-tad failed with error -17
> 
> Fixes: 3230b2b3c1ab5a0d3f99d5850bfdc4bf48d11cdd ("ACPI: TAD: Add low-level support for real time capability")

You should shorten this hash to 12 or so chars. Otherwise looks good.

> Signed-off-by: Daniel Tang <danielzgtg.opensource@gmail.com>
> ---
>  drivers/acpi/acpi_tad.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/acpi/acpi_tad.c b/drivers/acpi/acpi_tad.c
> index 91d7d90c47da..33418dd6768a 100644
> --- a/drivers/acpi/acpi_tad.c
> +++ b/drivers/acpi/acpi_tad.c
> @@ -565,6 +565,9 @@ static void acpi_tad_remove(struct platform_device *pdev)
>  
>  	pm_runtime_get_sync(dev);
>  
> +	if (dd->capabilities & ACPI_TAD_RT)
> +		sysfs_remove_group(&dev->kobj, &acpi_tad_time_attr_group);
> +
>  	if (dd->capabilities & ACPI_TAD_DC_WAKE)
>  		sysfs_remove_group(&dev->kobj, &acpi_tad_dc_attr_group);
>  
> -- 
> 2.48.1
> 

  reply	other threads:[~2025-08-28  5:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-27 22:51 Daniel Tang
2025-08-28  5:12 ` Mika Westerberg [this message]
2025-08-28  5:38   ` [PATCH v2] " Daniel Tang
2025-08-28  8:13     ` Mika Westerberg
2025-09-04 18:20       ` Rafael J. Wysocki

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=20250828051203.GU476609@black.igk.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=danielzgtg.opensource@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.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

all inboxes | Powered by JetHome®