[RFC PATCH v1 06/12] omap: Replace strstarts() by str_has_prefix().
laniel_francis at privacyrequired.com
laniel_francis at privacyrequired.com
Fri Dec 4 17:03:12 UTC 2020
From: Francis Laniel <laniel_francis at privacyrequired.com>
The two functions indicates if a string begins with a given prefix.
The only difference is that strstarts() returns a bool while str_has_prefix()
returns the length of the prefix if the string begins with it or 0 otherwise.
Signed-off-by: Francis Laniel <laniel_francis at privacyrequired.com>
---
drivers/gpu/drm/omapdrm/dss/base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/base.c b/drivers/gpu/drm/omapdrm/dss/base.c
index c7650a7c155d..dd3d466293d1 100644
--- a/drivers/gpu/drm/omapdrm/dss/base.c
+++ b/drivers/gpu/drm/omapdrm/dss/base.c
@@ -350,7 +350,7 @@ static bool omapdss_component_is_loaded(struct omapdss_comp_node *comp)
{
if (comp->dss_core_component)
return true;
- if (!strstarts(comp->compat, "omapdss,"))
+ if (!str_has_prefix(comp->compat, "omapdss,"))
return true;
if (omapdss_device_is_registered(comp->node))
return true;
--
2.20.1
More information about the dri-devel
mailing list