summaryrefslogtreecommitdiff
path: root/sys/modules
diff options
context:
space:
mode:
authorpgoyette <pgoyette@NetBSD.org>2022-04-01 15:49:11 +0000
committerpgoyette <pgoyette@NetBSD.org>2022-04-01 15:49:11 +0000
commita7f08516ba846285880e1edfd7278a8338e2c5e8 (patch)
treedc2c210498cfd96ffa7a9f073ef0d3a9ed130085 /sys/modules
parent4db5601851f49b432b0684aee74938cf6c3c8ad1 (diff)
Split i2c_subr.c into a separate module rather than including it in
the iic module. There are valid configurations where i2c_subr code can be both built-in and part of a loaded module (eg, piixpm is in the kernel, but the iic module is loaded later). This causes the in-kernel linker to detect a duplicate symbol.
Diffstat (limited to 'sys/modules')
-rw-r--r--sys/modules/Makefile3
-rw-r--r--sys/modules/i2c_subr/Makefile10
-rw-r--r--sys/modules/iic/Makefile4
3 files changed, 14 insertions, 3 deletions
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 2de5f78dddc..c2a9be1ef51 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.262 2021/12/07 17:39:54 brad Exp $
+# $NetBSD: Makefile,v 1.263 2022/04/01 15:49:11 pgoyette Exp $
.include <bsd.own.mk>
@@ -70,6 +70,7 @@ SUBDIR+= hythygtemp
SUBDIR+= am2315temp
SUBDIR+= i2cexec
SUBDIR+= i2c_bitbang
+SUBDIR+= i2c_subr
SUBDIR+= if_agr
SUBDIR+= if_aue
SUBDIR+= if_axe
diff --git a/sys/modules/i2c_subr/Makefile b/sys/modules/i2c_subr/Makefile
new file mode 100644
index 00000000000..f92f80c2c9e
--- /dev/null
+++ b/sys/modules/i2c_subr/Makefile
@@ -0,0 +1,10 @@
+# $NetBSD: Makefile,v 1.1 2022/04/01 15:49:11 pgoyette Exp $
+
+.include "../Makefile.inc"
+
+.PATH: ${S}/dev/i2c
+
+KMOD= i2c_subr
+SRCS= i2c_subr.c
+
+.include <bsd.kmodule.mk>
diff --git a/sys/modules/iic/Makefile b/sys/modules/iic/Makefile
index 217ef839475..d6fbffd1bfa 100644
--- a/sys/modules/iic/Makefile
+++ b/sys/modules/iic/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2019/02/17 04:05:53 rin Exp $
+# $NetBSD: Makefile,v 1.7 2022/04/01 15:49:11 pgoyette Exp $
.include "../Makefile.inc"
@@ -6,7 +6,7 @@
KMOD= iic
IOCONF= iic.ioconf
-SRCS= i2c.c i2c_subr.c
+SRCS= i2c.c
WARNS= 3