Skip to content

Commit 33f83d1

Browse files
William Breathitt GrayBartosz Golaszewski
authored andcommitted
gpio: ws16c48: Fix off-by-one error in WS16C48 resource region extent
The WinSystems WS16C48 I/O address region spans offsets 0x0 through 0xA, which is a total of 11 bytes. Fix the WS16C48_EXTENT define to the correct value of 11 so that access to necessary device registers is properly requested in the ws16c48_probe() callback by the devm_request_region() function call. Fixes: 2c05a0f ("gpio: ws16c48: Implement and utilize register structures") Cc: [email protected] Cc: Paul Demetrotion <[email protected]> Signed-off-by: William Breathitt Gray <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 5a78d5d commit 33f83d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpio/gpio-ws16c48.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <linux/spinlock.h>
1919
#include <linux/types.h>
2020

21-
#define WS16C48_EXTENT 10
21+
#define WS16C48_EXTENT 11
2222
#define MAX_NUM_WS16C48 max_num_isa_dev(WS16C48_EXTENT)
2323

2424
static unsigned int base[MAX_NUM_WS16C48];

0 commit comments

Comments
 (0)