[PATCH 2/7] i2c: scx200_acb - debug log cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ben,

> scx200_acb debug log cleanup.

> @@ -413,7 +408,7 @@ static int scx200_acb_probe(struct scx20
>  	outb(0x70, ACBCTL2);
>  
>  	if (inb(ACBCTL2) != 0x70) {
> -		DBG("ACBCTL2 readback failed\n");
> +		dev_dbg(&iface->adapter.dev, "ACBCTL2 readback failed\n");
>  		return -ENXIO;
>  	}
>  
> @@ -421,7 +416,8 @@ static int scx200_acb_probe(struct scx20
>  
>  	val = inb(ACBCTL1);
>  	if (val) {
> -		DBG("disabled, but ACBCTL1=0x%02x\n", val);
> +		dev_dbg(&iface->adapter.dev, "disabled, but ACBCTL1=0x%02x\n",
> +			val);
>  		return -ENXIO;
>  	}
>  
> @@ -431,7 +427,9 @@ static int scx200_acb_probe(struct scx20
>  
>  	val = inb(ACBCTL1);
>  	if ((val & ACBCTL1_NMINTE) != ACBCTL1_NMINTE) {
> -		DBG("enabled, but NMINTE won't be set, ACBCTL1=0x%02x\n", val);
> +		dev_dbg(&iface->adapter.dev,
> +			"enabled, but NMINTE won't be set, ACBCTL1=0x%02x\n",
> +			val);
>  		return -ENXIO;
>  	}

On second thought, these ones are probably not correct:
scx200_acb_probe is called before i2c_add_adapter, so the adapter's
device isn't properly setup at this point. You have to use pr_debug
instead of dev_dbg.

This also means that the uses of dev_err and dev_warn in
scx200_acb_create are not correct either, and should be changed to
boring printk calls.

-- 
Jean Delvare




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux