]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: tegra194: Create debugfs directory only when CONFIG_PCIEASPM is enabled
authorHans Zhang <18255117159@163.com>
Mon, 7 Apr 2025 12:43:31 +0000 (20:43 +0800)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Fri, 2 May 2025 17:36:45 +0000 (23:06 +0530)
commited798ff1c52f6fe232ce2e24e68fb63f5470ab97
treeeef0cf9bfca521e9c9969488f6dfeeceb840669c
parent0af2f6be1b4281385b618cb86ad946eded089ac8
PCI: tegra194: Create debugfs directory only when CONFIG_PCIEASPM is enabled

Previously, the debugfs directory was unconditionally created in
tegra_pcie_config_rp() regardless of the CONFIG_PCIEASPM setting.
This led to unnecessary directory creation when ASPM support was disabled
since only ASPM state count was exposed through debugfs.

Hence, move the debugfs directory creation into init_debugfs() which is
conditionally compiled based on CONFIG_PCIEASPM. This ensures that both
the directory and 'aspm_state_cnt' entry are only created when ASPM is
enabled and avoids cluttering debugfs with empty directories when ASPM is
disabled.

Signed-off-by: Hans Zhang <18255117159@163.com>
[mani: subject and description change]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/20250407124331.69459-1-18255117159@163.com
drivers/pci/controller/dwc/pcie-tegra194.c