PERFORCE change 122962 for review

Rui Paulo rpaulo at FreeBSD.org
Thu Jul 5 15:47:14 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=122962

Change 122962 by rpaulo at rpaulo_epsilon on 2007/07/05 15:46:56

	Use device_printf().	

Affected files ...

.. //depot/projects/soc2007/rpaulo-macbook/dev/usb/ukbd.c#9 edit

Differences ...

==== //depot/projects/soc2007/rpaulo-macbook/dev/usb/ukbd.c#9 (text+ko) ====

@@ -204,19 +204,17 @@
 	if (usbd_get_quirks(uaa->device)->uq_flags & UQ_KBD_FNKEY) {
 		err = usbd_read_report_desc(uaa->iface, &desc, &size, M_TEMP);
 		if (err) {
-			printf("%s: could not read report descriptor\n",
-			       device_get_nameunit(sc->sc_dev));
+			device_printf(self,
+			    "could not read report descriptor\n");
 			return ENXIO;
 		}
 
 		if (hid_locate(desc, size, HID_USAGE2(HUP_CUSTOM, HUC_FNKEY),
 			       hid_input, &sc->sc_loc_fn, &flags)) {
-			printf("%s: Fn key.\n",
-			       device_get_nameunit(sc->sc_dev));
+			device_printf(self, "Fn key.\n");
 			sc->sc_flags |= UKBD_FN;
 		} else
-			printf("%s: Fn key not found.\n",
-			       device_get_nameunit(sc->sc_dev));
+			device_printf(self, "Fn key not found.\n");
 		free(desc, M_TEMP);
 	}
 


More information about the p4-projects mailing list