Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Feb 2014 08:29:24 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r261508 - head/sys/dev/sound/pci/hda
Message-ID:  <201402050829.s158TOWL029495@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Feb  5 08:29:24 2014
New Revision: 261508
URL: http://svnweb.freebsd.org/changeset/base/261508

Log:
  Use system macro instead of own hand-rolled one.

Modified:
  head/sys/dev/sound/pci/hda/hdaa_patches.c

Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdaa_patches.c	Wed Feb  5 08:27:02 2014	(r261507)
+++ head/sys/dev/sound/pci/hda/hdaa_patches.c	Wed Feb  5 08:29:24 2014	(r261508)
@@ -142,7 +142,6 @@ static const struct {
 	    0, HDAA_QUIRK_OVREF,
 	    0 }
 };
-#define HDAC_QUIRKS_LEN (sizeof(hdac_quirks) / sizeof(hdac_quirks[0]))
 
 static void
 hdac_pin_patch(struct hdaa_widget *w)
@@ -466,7 +465,7 @@ hdaa_patch(struct hdaa_devinfo *devinfo)
 	/*
 	 * Quirks
 	 */
-	for (i = 0; i < HDAC_QUIRKS_LEN; i++) {
+	for (i = 0; i < nitems(hdac_quirks); i++) {
 		if (!(HDA_DEV_MATCH(hdac_quirks[i].model, subid) &&
 		    HDA_DEV_MATCH(hdac_quirks[i].id, id) &&
 		    HDA_DEV_MATCH(hdac_quirks[i].subsystemid, subsystemid)))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402050829.s158TOWL029495>