Date: Thu, 15 Aug 2013 20:03:22 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254379 - head/sys/dev/iir Message-ID: <201308152003.r7FK3M9e090406@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Thu Aug 15 20:03:22 2013 New Revision: 254379 URL: http://svnweb.freebsd.org/changeset/base/254379 Log: Avoid potential redefinition of the macro. Modified: head/sys/dev/iir/iir.c head/sys/dev/iir/iir.h head/sys/dev/iir/iir_ctrl.c head/sys/dev/iir/iir_pci.c Modified: head/sys/dev/iir/iir.c ============================================================================== --- head/sys/dev/iir/iir.c Thu Aug 15 20:00:32 2013 (r254378) +++ head/sys/dev/iir/iir.c Thu Aug 15 20:03:22 2013 (r254379) @@ -399,7 +399,7 @@ iir_init(struct gdt_softc *gdt) gdt->oem_name[7]='\0'; } else { /* Old method, based on PCI ID */ - if (gdt->sc_vendor == INTEL_VENDOR_ID) + if (gdt->sc_vendor == INTEL_VENDOR_ID_IIR) strcpy(gdt->oem_name,"Intel "); else strcpy(gdt->oem_name,"ICP "); @@ -1374,7 +1374,7 @@ iir_action( struct cam_sim *sim, union c (bus == gdt->sc_virt_bus ? 127 : gdt->sc_bus_id[bus]); cpi->base_transfer_speed = 3300; strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - if (gdt->sc_vendor == INTEL_VENDOR_ID) + if (gdt->sc_vendor == INTEL_VENDOR_ID_IIR) strncpy(cpi->hba_vid, "Intel Corp.", HBA_IDLEN); else strncpy(cpi->hba_vid, "ICP vortex ", HBA_IDLEN); Modified: head/sys/dev/iir/iir.h ============================================================================== --- head/sys/dev/iir/iir.h Thu Aug 15 20:00:32 2013 (r254378) +++ head/sys/dev/iir/iir.h Thu Aug 15 20:03:22 2013 (r254379) @@ -63,7 +63,7 @@ #define GDT_DEVICE_ID_MAX 0x2ff #define GDT_DEVICE_ID_NEWRX 0x300 -#define INTEL_VENDOR_ID 0x8086 +#define INTEL_VENDOR_ID_IIR 0x8086 #define INTEL_DEVICE_ID_IIR 0x600 #define GDT_MAXBUS 6 /* XXX Why not 5? */ Modified: head/sys/dev/iir/iir_ctrl.c ============================================================================== --- head/sys/dev/iir/iir_ctrl.c Thu Aug 15 20:00:32 2013 (r254378) +++ head/sys/dev/iir/iir_ctrl.c Thu Aug 15 20:03:22 2013 (r254379) @@ -273,7 +273,7 @@ iir_ioctl(struct cdev *dev, u_long cmd, return (ENXIO); /* only RP controllers */ p->ext_type = 0x6000 | gdt->sc_device; - if (gdt->sc_vendor == INTEL_VENDOR_ID) { + if (gdt->sc_vendor == INTEL_VENDOR_ID_IIR) { p->oem_id = OEM_ID_INTEL; p->type = 0xfd; /* new -> subdevice into ext_type */ Modified: head/sys/dev/iir/iir_pci.c ============================================================================== --- head/sys/dev/iir/iir_pci.c Thu Aug 15 20:00:32 2013 (r254378) +++ head/sys/dev/iir/iir_pci.c Thu Aug 15 20:03:22 2013 (r254379) @@ -163,7 +163,7 @@ MODULE_DEPEND(iir, cam, 1, 1, 1); static int iir_pci_probe(device_t dev) { - if (pci_get_vendor(dev) == INTEL_VENDOR_ID && + if (pci_get_vendor(dev) == INTEL_VENDOR_ID_IIR && pci_get_device(dev) == INTEL_DEVICE_ID_IIR) { device_set_desc(dev, "Intel Integrated RAID Controller"); return (BUS_PROBE_DEFAULT);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308152003.r7FK3M9e090406>