summaryrefslogtreecommitdiff
path: root/drivers/block/n64cart.c
diff options
context:
space:
mode:
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>2021-01-26 02:32:38 +0300
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2021-02-22 01:37:52 +0300
commit2ce503b35dcea29767c6d03b44e3c535809fdfcc (patch)
tree627f1ffe262794d81783acb2d1374e81fd5df6af /drivers/block/n64cart.c
parente39e31326305d9bb35f8ab78c4310b9a38bbb3aa (diff)
downloadlinux-2ce503b35dcea29767c6d03b44e3c535809fdfcc.tar.xz
n64: use enums for reg
Macros tend to be not type-safe. Use enum for register definitions. Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Lauri Kasanen <cand@gmx.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'drivers/block/n64cart.c')
-rw-r--r--drivers/block/n64cart.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/block/n64cart.c b/drivers/block/n64cart.c
index b18f034ee1ad..620f9e080d5d 100644
--- a/drivers/block/n64cart.c
+++ b/drivers/block/n64cart.c
@@ -13,11 +13,13 @@
#include <linux/module.h>
#include <linux/platform_device.h>
-#define PI_DRAM_REG 0
-#define PI_CART_REG 1
-#define PI_READ_REG 2
-#define PI_WRITE_REG 3
-#define PI_STATUS_REG 4
+enum {
+ PI_DRAM_REG = 0,
+ PI_CART_REG,
+ PI_READ_REG,
+ PI_WRITE_REG,
+ PI_STATUS_REG,
+};
#define PI_STATUS_DMA_BUSY (1 << 0)
#define PI_STATUS_IO_BUSY (1 << 1)