mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fbdev/udlfb: Use const 'struct bin_attribute' callback
@ 2024-12-15 14:55 Thomas Weißschuh
  2024-12-22  6:06 ` Helge Deller
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Weißschuh @ 2024-12-15 14:55 UTC (permalink / raw)
  To: Bernie Thompson, Helge Deller
  Cc: linux-fbdev, dri-devel, linux-kernel, Thomas Weißschuh

The sysfs core now provides callback variants that explicitly take a
const pointer. Make use of it to match the attribute definition.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 drivers/video/fbdev/udlfb.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c
index 71ac9e36f67c68aa7a54dce32323047a2a9a48bf..acadf0eb450c3d76c05fcb9cc7e7c3f6dd8f31ef 100644
--- a/drivers/video/fbdev/udlfb.c
+++ b/drivers/video/fbdev/udlfb.c
@@ -1416,7 +1416,7 @@ static ssize_t metrics_cpu_kcycles_used_show(struct device *fbdev,
 
 static ssize_t edid_show(
 			struct file *filp,
-			struct kobject *kobj, struct bin_attribute *a,
+			struct kobject *kobj, const struct bin_attribute *a,
 			 char *buf, loff_t off, size_t count) {
 	struct device *fbdev = kobj_to_dev(kobj);
 	struct fb_info *fb_info = dev_get_drvdata(fbdev);
@@ -1438,7 +1438,7 @@ static ssize_t edid_show(
 
 static ssize_t edid_store(
 			struct file *filp,
-			struct kobject *kobj, struct bin_attribute *a,
+			struct kobject *kobj, const struct bin_attribute *a,
 			char *src, loff_t src_off, size_t src_size) {
 	struct device *fbdev = kobj_to_dev(kobj);
 	struct fb_info *fb_info = dev_get_drvdata(fbdev);
@@ -1482,8 +1482,8 @@ static const struct bin_attribute edid_attr = {
 	.attr.name = "edid",
 	.attr.mode = 0666,
 	.size = EDID_LENGTH,
-	.read = edid_show,
-	.write = edid_store
+	.read_new = edid_show,
+	.write_new = edid_store
 };
 
 static const struct device_attribute fb_device_attrs[] = {

---
base-commit: 2d8308bf5b67dff50262d8a9260a50113b3628c6
change-id: 20241215-sysfs-const-bin_attr-udlfb-7979d7f0d3c6

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fbdev/udlfb: Use const 'struct bin_attribute' callback
  2024-12-15 14:55 [PATCH] fbdev/udlfb: Use const 'struct bin_attribute' callback Thomas Weißschuh
@ 2024-12-22  6:06 ` Helge Deller
  0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2024-12-22  6:06 UTC (permalink / raw)
  To: Thomas Weißschuh, Bernie Thompson
  Cc: linux-fbdev, dri-devel, linux-kernel

On 12/15/24 15:55, Thomas Weißschuh wrote:
> The sysfs core now provides callback variants that explicitly take a
> const pointer. Make use of it to match the attribute definition.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
>   drivers/video/fbdev/udlfb.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)

applied.

Thanks!
Helge


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-22  6:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-15 14:55 [PATCH] fbdev/udlfb: Use const 'struct bin_attribute' callback Thomas Weißschuh
2024-12-22  6:06 ` Helge Deller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®