瀏覽代碼

AMD IOMMU: use dev_name instead of self-build print_devid

Impact: use generic dev_name instead of own function

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Joerg Roedel 16 年之前
父節點
當前提交
ab89672286
共有 2 個文件被更改,包括 1 次插入14 次删除
  1. 0 12
      arch/x86/include/asm/amd_iommu_types.h
  2. 1 2
      arch/x86/kernel/amd_iommu.c

+ 0 - 12
arch/x86/include/asm/amd_iommu_types.h

@@ -389,18 +389,6 @@ extern int amd_iommu_isolate;
  */
  */
 extern bool amd_iommu_unmap_flush;
 extern bool amd_iommu_unmap_flush;
 
 
-/* takes a PCI device id and prints it out in a readable form */
-static inline void print_devid(u16 devid, int nl)
-{
-	int bus = devid >> 8;
-	int dev = devid >> 3 & 0x1f;
-	int fn  = devid & 0x07;
-
-	printk("%02x:%02x.%x", bus, dev, fn);
-	if (nl)
-		printk("\n");
-}
-
 /* takes bus and device/function and returns the device id
 /* takes bus and device/function and returns the device id
  * FIXME: should that be in generic PCI code? */
  * FIXME: should that be in generic PCI code? */
 static inline u16 calc_devid(u8 bus, u8 devfn)
 static inline u16 calc_devid(u8 bus, u8 devfn)

+ 1 - 2
arch/x86/kernel/amd_iommu.c

@@ -1074,8 +1074,7 @@ static int get_device_resources(struct device *dev,
 		*domain = &dma_dom->domain;
 		*domain = &dma_dom->domain;
 		attach_device(*iommu, *domain, *bdf);
 		attach_device(*iommu, *domain, *bdf);
 		printk(KERN_INFO "AMD IOMMU: Using protection domain %d for "
 		printk(KERN_INFO "AMD IOMMU: Using protection domain %d for "
-				"device ", (*domain)->id);
-		print_devid(_bdf, 1);
+				"device %s\n", (*domain)->id, dev_name(dev));
 	}
 	}
 
 
 	if (domain_for_device(_bdf) == NULL)
 	if (domain_for_device(_bdf) == NULL)