From: jsg Date: Sat, 15 Jun 2024 04:10:49 +0000 (+0000) Subject: drm/mipi-dsi: use correct return type for the DSC functions X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=432d7beb59e13d64db0462ee3d77935929f853b2;p=openbsd drm/mipi-dsi: use correct return type for the DSC functions From Dmitry Baryshkov dda6efae161dc200b449d9099d0dfadfa75275c9 in linux-6.6.y/6.6.33 de1c705c50326acaceaf1f02bc5bf6f267c572bd in mainline linux --- diff --git a/sys/dev/pci/drm/drm_mipi_dsi.c b/sys/dev/pci/drm/drm_mipi_dsi.c index 97fd47b3615..2ea9c6ddcbe 100644 --- a/sys/dev/pci/drm/drm_mipi_dsi.c +++ b/sys/dev/pci/drm/drm_mipi_dsi.c @@ -666,7 +666,7 @@ EXPORT_SYMBOL(mipi_dsi_set_maximum_return_packet_size); * * Return: 0 on success or a negative error code on failure. */ -ssize_t mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable) +int mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable) { /* Note: Needs updating for non-default PPS or algorithm */ u8 tx[2] = { enable << 0, 0 }; @@ -691,8 +691,8 @@ EXPORT_SYMBOL(mipi_dsi_compression_mode); * * Return: 0 on success or a negative error code on failure. */ -ssize_t mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi, - const struct drm_dsc_picture_parameter_set *pps) +int mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi, + const struct drm_dsc_picture_parameter_set *pps) { struct mipi_dsi_msg msg = { .channel = dsi->channel, diff --git a/sys/dev/pci/drm/include/drm/drm_mipi_dsi.h b/sys/dev/pci/drm/include/drm/drm_mipi_dsi.h index ca58202ec51..a81d1bbde7f 100644 --- a/sys/dev/pci/drm/include/drm/drm_mipi_dsi.h +++ b/sys/dev/pci/drm/include/drm/drm_mipi_dsi.h @@ -70,8 +70,8 @@ ssize_t mipi_dsi_dcs_write(struct mipi_dsi_device *, u8, const void *, size_t); int mipi_dsi_dcs_nop(struct mipi_dsi_device *); int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *, u16); bool mipi_dsi_packet_format_is_long(u8); -ssize_t mipi_dsi_compression_mode(struct mipi_dsi_device *, bool); -ssize_t mipi_dsi_picture_parameter_set(struct mipi_dsi_device *, +int mipi_dsi_compression_mode(struct mipi_dsi_device *, bool); +int mipi_dsi_picture_parameter_set(struct mipi_dsi_device *, const struct drm_dsc_picture_parameter_set *); static inline int