forked from Minki/linux
staging/gdm72xx: Use dev_ printks in gdm_sdio.c
fixed below checkpatch warnings. - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... - WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
cade0fe46f
commit
c9a796d6a6
@ -157,7 +157,7 @@ static int init_sdio(struct sdiowm_dev *sdev)
|
|||||||
|
|
||||||
tx->sdu_buf = kmalloc(SDU_TX_BUF_SIZE, GFP_KERNEL);
|
tx->sdu_buf = kmalloc(SDU_TX_BUF_SIZE, GFP_KERNEL);
|
||||||
if (tx->sdu_buf == NULL) {
|
if (tx->sdu_buf == NULL) {
|
||||||
printk(KERN_ERR "Failed to allocate SDU tx buffer.\n");
|
dev_err(&sdev->func->dev, "Failed to allocate SDU tx buffer.\n");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ static int init_sdio(struct sdiowm_dev *sdev)
|
|||||||
|
|
||||||
rx->rx_buf = kmalloc(RX_BUF_SIZE, GFP_KERNEL);
|
rx->rx_buf = kmalloc(RX_BUF_SIZE, GFP_KERNEL);
|
||||||
if (rx->rx_buf == NULL) {
|
if (rx->rx_buf == NULL) {
|
||||||
printk(KERN_ERR "Failed to allocate rx buffer.\n");
|
dev_err(&sdev->func->dev, "Failed to allocate rx buffer.\n");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,7 +246,8 @@ static void send_sdio_pkt(struct sdio_func *func, u8 *data, int len)
|
|||||||
ret = sdio_memcpy_toio(func, 0, data, n);
|
ret = sdio_memcpy_toio(func, 0, data, n);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (ret != -ENOMEDIUM)
|
if (ret != -ENOMEDIUM)
|
||||||
printk(KERN_ERR "gdmwms: %s error: ret = %d\n",
|
dev_err(&func->dev,
|
||||||
|
"gdmwms: %s error: ret = %d\n",
|
||||||
__func__, ret);
|
__func__, ret);
|
||||||
goto end_io;
|
goto end_io;
|
||||||
}
|
}
|
||||||
@ -259,7 +260,8 @@ static void send_sdio_pkt(struct sdio_func *func, u8 *data, int len)
|
|||||||
ret = sdio_memcpy_toio(func, 0, data + n, remain);
|
ret = sdio_memcpy_toio(func, 0, data + n, remain);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (ret != -ENOMEDIUM)
|
if (ret != -ENOMEDIUM)
|
||||||
printk(KERN_ERR "gdmwms: %s error: ret = %d\n",
|
dev_err(&func->dev,
|
||||||
|
"gdmwms: %s error: ret = %d\n",
|
||||||
__func__, ret);
|
__func__, ret);
|
||||||
goto end_io;
|
goto end_io;
|
||||||
}
|
}
|
||||||
@ -522,13 +524,14 @@ static void gdm_sdio_irq(struct sdio_func *func)
|
|||||||
|
|
||||||
ret = sdio_memcpy_fromio(func, hdr, 0x0, TYPE_A_LOOKAHEAD_SIZE);
|
ret = sdio_memcpy_fromio(func, hdr, 0x0, TYPE_A_LOOKAHEAD_SIZE);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk(KERN_ERR "Cannot read from function %d\n", func->num);
|
dev_err(&func->dev,
|
||||||
|
"Cannot read from function %d\n", func->num);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
len = (hdr[2] << 16) | (hdr[1] << 8) | hdr[0];
|
len = (hdr[2] << 16) | (hdr[1] << 8) | hdr[0];
|
||||||
if (len > (RX_BUF_SIZE - TYPE_A_HEADER_SIZE)) {
|
if (len > (RX_BUF_SIZE - TYPE_A_HEADER_SIZE)) {
|
||||||
printk(KERN_ERR "Too big Type-A size: %d\n", len);
|
dev_err(&func->dev, "Too big Type-A size: %d\n", len);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -562,8 +565,8 @@ static void gdm_sdio_irq(struct sdio_func *func)
|
|||||||
n = blocks * func->cur_blksize;
|
n = blocks * func->cur_blksize;
|
||||||
ret = sdio_memcpy_fromio(func, buf, 0x0, n);
|
ret = sdio_memcpy_fromio(func, buf, 0x0, n);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk(KERN_ERR "Cannot read from function %d\n",
|
dev_err(&func->dev,
|
||||||
func->num);
|
"Cannot read from function %d\n", func->num);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
buf += n;
|
buf += n;
|
||||||
@ -573,8 +576,8 @@ static void gdm_sdio_irq(struct sdio_func *func)
|
|||||||
if (remain) {
|
if (remain) {
|
||||||
ret = sdio_memcpy_fromio(func, buf, 0x0, remain);
|
ret = sdio_memcpy_fromio(func, buf, 0x0, remain);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk(KERN_ERR "Cannot read from function %d\n",
|
dev_err(&func->dev,
|
||||||
func->num);
|
"Cannot read from function %d\n", func->num);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -637,9 +640,9 @@ static int sdio_wimax_probe(struct sdio_func *func,
|
|||||||
struct phy_dev *phy_dev = NULL;
|
struct phy_dev *phy_dev = NULL;
|
||||||
struct sdiowm_dev *sdev = NULL;
|
struct sdiowm_dev *sdev = NULL;
|
||||||
|
|
||||||
printk(KERN_INFO "Found GDM SDIO VID = 0x%04x PID = 0x%04x...\n",
|
dev_info(&func->dev, "Found GDM SDIO VID = 0x%04x PID = 0x%04x...\n",
|
||||||
func->vendor, func->device);
|
func->vendor, func->device);
|
||||||
printk(KERN_INFO "GCT WiMax driver version %s\n", DRIVER_VERSION);
|
dev_info(&func->dev, "GCT WiMax driver version %s\n", DRIVER_VERSION);
|
||||||
|
|
||||||
sdio_claim_host(func);
|
sdio_claim_host(func);
|
||||||
sdio_enable_func(func);
|
sdio_enable_func(func);
|
||||||
|
Loading…
Reference in New Issue
Block a user