diff options
author | Xi Pardee <xi.pardee@linux.intel.com> | 2024-06-24 13:32:16 -0700 |
---|---|---|
committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2024-07-08 10:43:52 +0300 |
commit | 590a87fe36f1aa43e2d145a0b16d223f2f374899 (patch) | |
tree | 1bb5fe1b799189a70014a0c8581e27fdea49890a /drivers/platform | |
parent | 97eb32b0ff3917ab4ec2745aafc318042c95e4a7 (diff) |
platform/x86:intel/pmc: Use DEFINE_SHOW_STORE_ATTRIBUTE macro
DEFINE_SHOW_STORE_ATTRIBUTE() macro can be used for the ltr_ignore
attribute for better readability.
Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com>
Link: https://lore.kernel.org/r/20240624203218.2428475-8-xi.pardee@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/intel/pmc/core.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c index 89db5b1a6551..41ffc18087eb 100644 --- a/drivers/platform/x86/intel/pmc/core.c +++ b/drivers/platform/x86/intel/pmc/core.c @@ -529,19 +529,7 @@ static int pmc_core_ltr_ignore_show(struct seq_file *s, void *unused) { return 0; } - -static int pmc_core_ltr_ignore_open(struct inode *inode, struct file *file) -{ - return single_open(file, pmc_core_ltr_ignore_show, inode->i_private); -} - -static const struct file_operations pmc_core_ltr_ignore_ops = { - .open = pmc_core_ltr_ignore_open, - .read = seq_read, - .write = pmc_core_ltr_ignore_write, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_STORE_ATTRIBUTE(pmc_core_ltr_ignore); static void pmc_core_slps0_dbg_latch(struct pmc_dev *pmcdev, bool reset) { @@ -1218,7 +1206,7 @@ static void pmc_core_dbgfs_register(struct pmc_dev *pmcdev) pmcdev, &pmc_core_ppfear_fops); debugfs_create_file("ltr_ignore", 0644, dir, pmcdev, - &pmc_core_ltr_ignore_ops); + &pmc_core_ltr_ignore_fops); debugfs_create_file("ltr_show", 0444, dir, pmcdev, &pmc_core_ltr_fops); |