mirror of
				https://github.com/Ysurac/openmptcprouter.git
				synced 2025-03-09 15:40:20 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
From f1f172ace5f5cdafbc4fe42b1a6b787f04c4403b Mon Sep 17 00:00:00 2001
 | 
						|
From: Dan Carpenter <dan.carpenter@oracle.com>
 | 
						|
Date: Fri, 20 Oct 2017 03:28:45 +0300
 | 
						|
Subject: [PATCH 220/277] drm/panel: rpi-touchscreen: propagate errors in
 | 
						|
 rpi_touchscreen_i2c_read()
 | 
						|
 | 
						|
There is one caller which checks whether rpi_touchscreen_i2c_read()
 | 
						|
returns negative error codes.  Currently it can't because negative
 | 
						|
error codes are truncated to u8, but that's easy to fix if we change the
 | 
						|
type to int.
 | 
						|
 | 
						|
Fixes: 2f733d6194bd ("drm/panel: Add support for the Raspberry Pi 7" Touchscreen.")
 | 
						|
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
 | 
						|
Signed-off-by: Eric Anholt <eric@anholt.net>
 | 
						|
Link: https://patchwork.freedesktop.org/patch/msgid/20171020002845.kar2wg7gqxg7tzqi@mwanda
 | 
						|
Reviewed-by: Eric Anholt <eric@anholt.net>
 | 
						|
(cherry picked from commit 85b4587f8e94143bafb8b6a4003a5187b9a8753d)
 | 
						|
---
 | 
						|
 drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 +-
 | 
						|
 1 file changed, 1 insertion(+), 1 deletion(-)
 | 
						|
 | 
						|
diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
 | 
						|
index b57b7ad9aa4c..128523d8d518 100644
 | 
						|
--- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
 | 
						|
+++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
 | 
						|
@@ -243,7 +243,7 @@ static struct rpi_touchscreen *panel_to_ts(struct drm_panel *panel)
 | 
						|
 	return container_of(panel, struct rpi_touchscreen, base);
 | 
						|
 }
 | 
						|
 
 | 
						|
-static u8 rpi_touchscreen_i2c_read(struct rpi_touchscreen *ts, u8 reg)
 | 
						|
+static int rpi_touchscreen_i2c_read(struct rpi_touchscreen *ts, u8 reg)
 | 
						|
 {
 | 
						|
 	return i2c_smbus_read_byte_data(ts->bridge_i2c, reg);
 | 
						|
 }
 | 
						|
-- 
 | 
						|
2.16.1
 | 
						|
 |