summaryrefslogtreecommitdiff
path: root/drivers/zorro/names.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/zorro/names.c')
-rw-r--r--drivers/zorro/names.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/drivers/zorro/names.c b/drivers/zorro/names.c
index e8517c3d8e82..b44f90989a66 100644
--- a/drivers/zorro/names.c
+++ b/drivers/zorro/names.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Zorro Device Name Tables
*
@@ -14,8 +15,7 @@
#include <linux/types.h>
#include <linux/zorro.h>
-
-#ifdef CONFIG_ZORRO_NAMES
+#include "zorro.h"
struct zorro_prod_info {
__u16 prod;
@@ -36,25 +36,25 @@ struct zorro_manuf_info {
* real memory.. Parse the same file multiple times
* to get all the info.
*/
-#define MANUF( manuf, name ) static char __manufstr_##manuf[] __initdata = name;
+#define MANUF(manuf, name) static char __manufstr_##manuf[] __initdata = name;
#define ENDMANUF()
-#define PRODUCT( manuf, prod, name ) static char __prodstr_##manuf##prod[] __initdata = name;
+#define PRODUCT(manuf, prod, name) static char __prodstr_##manuf##prod[] __initdata = name;
#include "devlist.h"
-#define MANUF( manuf, name ) static struct zorro_prod_info __prods_##manuf[] __initdata = {
+#define MANUF(manuf, name) static struct zorro_prod_info __prods_##manuf[] __initdata = {
#define ENDMANUF() };
-#define PRODUCT( manuf, prod, name ) { 0x##prod, 0, __prodstr_##manuf##prod },
+#define PRODUCT(manuf, prod, name) { 0x##prod, 0, __prodstr_##manuf##prod },
#include "devlist.h"
static struct zorro_manuf_info __initdata zorro_manuf_list[] = {
-#define MANUF( manuf, name ) { 0x##manuf, sizeof(__prods_##manuf) / sizeof(struct zorro_prod_info), __manufstr_##manuf, __prods_##manuf },
+#define MANUF(manuf, name) { 0x##manuf, ARRAY_SIZE(__prods_##manuf), __manufstr_##manuf, __prods_##manuf },
#define ENDMANUF()
-#define PRODUCT( manuf, prod, name )
+#define PRODUCT(manuf, prod, name)
#include "devlist.h"
};
-#define MANUFS (sizeof(zorro_manuf_list)/sizeof(struct zorro_manuf_info))
+#define MANUFS ARRAY_SIZE(zorro_manuf_list)
void __init zorro_name_device(struct zorro_dev *dev)
{
@@ -69,7 +69,6 @@ void __init zorro_name_device(struct zorro_dev *dev)
} while (--i);
/* Couldn't find either the manufacturer nor the product */
- sprintf(name, "Zorro device %08x", dev->id);
return;
match_manuf: {
@@ -98,11 +97,3 @@ void __init zorro_name_device(struct zorro_dev *dev)
}
}
}
-
-#else
-
-void __init zorro_name_device(struct zorro_dev *dev)
-{
-}
-
-#endif