aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sysfb.h
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javierm@redhat.com>2022-06-07 20:23:34 +0200
committerJavier Martinez Canillas <javierm@redhat.com>2022-06-29 09:51:31 +0200
commit9e121040e54abef9ed5542e5fdfa87911cd96204 (patch)
tree5dc052d0189913894d107e5f18dd08a76d652221 /include/linux/sysfb.h
parentdrm/vc4: perfmon: Fix variable dereferenced before check (diff)
downloadlinux-dev-9e121040e54abef9ed5542e5fdfa87911cd96204.tar.xz
linux-dev-9e121040e54abef9ed5542e5fdfa87911cd96204.zip
firmware: sysfb: Make sysfb_create_simplefb() return a pdev pointer
This function just returned 0 on success or an errno code on error, but it could be useful for sysfb_init() callers to have a pointer to the device. Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20220607182338.344270-2-javierm@redhat.com
Diffstat (limited to 'include/linux/sysfb.h')
-rw-r--r--include/linux/sysfb.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/sysfb.h b/include/linux/sysfb.h
index b0dcfa26d07b..708152e9037b 100644
--- a/include/linux/sysfb.h
+++ b/include/linux/sysfb.h
@@ -72,8 +72,8 @@ static inline void sysfb_apply_efi_quirks(struct platform_device *pd)
bool sysfb_parse_mode(const struct screen_info *si,
struct simplefb_platform_data *mode);
-int sysfb_create_simplefb(const struct screen_info *si,
- const struct simplefb_platform_data *mode);
+struct platform_device *sysfb_create_simplefb(const struct screen_info *si,
+ const struct simplefb_platform_data *mode);
#else /* CONFIG_SYSFB_SIMPLE */
@@ -83,10 +83,10 @@ static inline bool sysfb_parse_mode(const struct screen_info *si,
return false;
}
-static inline int sysfb_create_simplefb(const struct screen_info *si,
- const struct simplefb_platform_data *mode)
+static inline struct platform_device *sysfb_create_simplefb(const struct screen_info *si,
+ const struct simplefb_platform_data *mode)
{
- return -EINVAL;
+ return ERR_PTR(-EINVAL);
}
#endif /* CONFIG_SYSFB_SIMPLE */