Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52182c75 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven
Browse files

zorro: Refactor conditional handling of Zorro device name database



Using an empty static inline function in the CONFIG_ZORRO_NAMES=n case
allows to drop compilation of names.c.

Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent bd79014c
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2,8 +2,9 @@
# Makefile for the Zorro bus specific drivers.
# Makefile for the Zorro bus specific drivers.
#
#


obj-$(CONFIG_ZORRO)	+= zorro.o zorro-driver.o zorro-sysfs.o names.o
obj-$(CONFIG_ZORRO)	+= zorro.o zorro-driver.o zorro-sysfs.o
obj-$(CONFIG_PROC_FS)	+= proc.o
obj-$(CONFIG_PROC_FS)	+= proc.o
obj-$(CONFIG_ZORRO_NAMES) +=  names.o


hostprogs-y 		:= gen-devlist
hostprogs-y 		:= gen-devlist


+0 −10
Original line number Original line Diff line number Diff line
@@ -15,8 +15,6 @@
#include <linux/zorro.h>
#include <linux/zorro.h>




#ifdef CONFIG_ZORRO_NAMES

struct zorro_prod_info {
struct zorro_prod_info {
	__u16 prod;
	__u16 prod;
	unsigned short seen;
	unsigned short seen;
@@ -97,11 +95,3 @@ void __init zorro_name_device(struct zorro_dev *dev)
		}
		}
	}
	}
}
}

#else

void __init zorro_name_device(struct zorro_dev *dev)
{
}

#endif
+5 −0
Original line number Original line Diff line number Diff line


#ifdef CONFIG_ZORRO_NAMES
extern void zorro_name_device(struct zorro_dev *z);
extern void zorro_name_device(struct zorro_dev *z);
#else
static inline void zorro_name_device(struct zorro_dev *dev) { }
#endif

extern int zorro_create_sysfs_dev_files(struct zorro_dev *z);
extern int zorro_create_sysfs_dev_files(struct zorro_dev *z);