summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRong Zhang <i@rong.moe>2026-10-19 23:02:28 +0800
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-10-20 15:05:42 +0300
commit50a11dcdbd073a26b152b46d214cc980ecfc8426 (patch)
treeec85f60c3db5d2e6c98b29459036d3605c1d2659 /scripts
parent9a4102e4185ad37d41b00d263ac05c370f5c9baf (diff)
platform/x86: lenovo-wmi-{capdata,other}: Only allocate capdata list when necessary
When no capability data is available, there is no need to allocate capability data list as it's basically unused except for the priv->list->count == 0 placeholder. Therefore, only allocate priv->list when necessary, otherwise its absence implies the absence of capability data. In this manner, lenovo-wmi-other can skip registering unavailable functionalities accordingly. Meanwhile, skip creating the debugfs directory as it provides nothing when there is no capability data. Tested-by: Navon John Lukose <navonjohnlukose@gmail.com> Reviewed-by: Derek J. Clark <derekjohn.clark@gmail.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Rong Zhang <i@rong.moe> Link: https://patch.msgid.link/20261019-lwmi-wmi-new-api-v5-6-71557d28d058@rong.moe Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions