Date: Wed, 22 Oct 2008 01:47:44 -0700 From: Xin LI <delphij@delphij.net> To: FreeBSD Current <freebsd-current@freebsd.org>, jhb@freebsd.org Subject: [patch] fix build wrt ppbus Message-ID: <48FEE8B0.7090906@delphij.net>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Here is a patch which can (presumbly) fix ppbus build issue... I don't
think I'm familiar with the code enough so I'd like to seek review from
someone else.
Cheers,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
iEYEARECAAYFAkj+6LAACgkQi+vbBBjt66DkkwCfdqzbx4MIZOQjVb3tWEpoaSqr
gmQAoJrM0zOt+XGMXVLzlaoHMCZe7L0L
=YT9q
-----END PGP SIGNATURE-----
[-- Attachment #2 --]
Index: lpt.c
===================================================================
--- lpt.c (版本 184151)
+++ lpt.c (工作副本)
@@ -399,7 +399,7 @@
sc->cdev_bypass = make_dev(&lpt_cdevsw, unit,
UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d.ctl", unit);
sc->cdev_bypass->si_drv1 = sc;
- sc->cdev_bypass->si_drv2 = LP_BYPASS;
+ sc->cdev_bypass->si_drv2 = (void *)(intptr_t)LP_BYPASS;
return (0);
}
@@ -476,7 +476,7 @@
} else
sc->sc_state |= LPTINIT;
- sc->sc_flags = dev->si_drv2;
+ sc->sc_flags = (char)(intptr_t)dev->si_drv2;
/* Check for open with BYPASS flag set. */
if (sc->sc_flags & LP_BYPASS) {
Index: ppi.c
===================================================================
--- ppi.c (版本 184151)
+++ ppi.c (工作副本)
@@ -171,7 +171,7 @@
UID_ROOT, GID_WHEEL,
0600, "ppi%d", device_get_unit(dev));
if (ppi->ppi_cdev == NULL) {
- device_printf("Failed to create character device\n");
+ device_printf(dev, "Failed to create character device\n");
return (ENXIO);
}
ppi->ppi_cdev->si_drv1 = ppi;
@@ -496,6 +496,7 @@
{
struct ppi_data *ppi = dev->si_drv1;
device_t ppidev = ppi->ppi_device;
+ device_t ppbus = device_get_parent(ppidev);
int error = 0;
u_int8_t *val = (u_int8_t *)data;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48FEE8B0.7090906>
