Skip to content

Commit 8d60902

Browse files
Sakari Ailusrafaeljw
authored andcommitted
ACPI: property: Polish ignoring bad data nodes
Clean up ignoring data nodes in mipi-disco-img.c: use { } initialiser, fix a kernel-doc warning and use isdigit(). Fixes: 5bd4edb ("ACPI: property: Ignore bad graph port nodes on Dell XPS 9315") Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 5bd4edb commit 8d60902

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/acpi/mipi-disco-img.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ static const struct dmi_system_id dmi_ignore_port_nodes[] = {
732732
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 9315"),
733733
},
734734
},
735-
{ 0 }
735+
{ }
736736
};
737737

738738
static const char *strnext(const char *s1, const char *s2)
@@ -749,7 +749,7 @@ static const char *strnext(const char *s1, const char *s2)
749749
* acpi_graph_ignore_port - Tell whether a port node should be ignored
750750
* @handle: The ACPI handle of the node (which may be a port node)
751751
*
752-
* Returns true if a port node should be ignored and the data to that should
752+
* Return: true if a port node should be ignored and the data to that should
753753
* come from other sources instead (Windows ACPI definitions and
754754
* ipu-bridge). This is currently used to ignore bad port nodes related to IPU6
755755
* ("IPU?") and camera sensor devices ("LNK?") in certain Dell systems with
@@ -778,12 +778,12 @@ bool acpi_graph_ignore_port(acpi_handle handle)
778778
if (!path)
779779
goto out_free;
780780

781-
if (!(path[0] >= '0' && path[0] <= '9' && path[1] == '.'))
781+
if (!(isdigit(path[0]) && path[1] == '.'))
782782
goto out_free;
783783

784784
/* Check if the node has a "PRT" prefix. */
785785
path = strnext(path, "PRT");
786-
if (path && path[0] >= '0' && path[0] <= '9' && !path[1]) {
786+
if (path && isdigit(path[0]) && !path[1]) {
787787
acpi_handle_debug(handle, "ignoring data node\n");
788788

789789
kfree(orig_path);

0 commit comments

Comments
 (0)