tx->sdu_buf = kmalloc(SDU_TX_BUF_SIZE, GFP_KERNEL);
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;
}
rx->rx_buf = kmalloc(RX_BUF_SIZE, GFP_KERNEL);
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;
}
ret = sdio_memcpy_toio(func, 0, data, n);
if (ret < 0) {
if (ret != -ENOMEDIUM)
- printk(KERN_ERR "gdmwms: %s error: ret = %d\n",
+ dev_err(&func->dev,
+ "gdmwms: %s error: ret = %d\n",
__func__, ret);
goto end_io;
}
ret = sdio_memcpy_toio(func, 0, data + n, remain);
if (ret < 0) {
if (ret != -ENOMEDIUM)
- printk(KERN_ERR "gdmwms: %s error: ret = %d\n",
+ dev_err(&func->dev,
+ "gdmwms: %s error: ret = %d\n",
__func__, ret);
goto end_io;
}
ret = sdio_memcpy_fromio(func, hdr, 0x0, TYPE_A_LOOKAHEAD_SIZE);
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;
}
len = (hdr[2] << 16) | (hdr[1] << 8) | hdr[0];
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;
}
n = blocks * func->cur_blksize;
ret = sdio_memcpy_fromio(func, buf, 0x0, n);
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;
}
buf += n;
if (remain) {
ret = sdio_memcpy_fromio(func, buf, 0x0, remain);
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;
}
}
struct phy_dev *phy_dev = NULL;
struct sdiowm_dev *sdev = NULL;
- printk(KERN_INFO "Found GDM SDIO VID = 0x%04x PID = 0x%04x...\n",
- func->vendor, func->device);
- printk(KERN_INFO "GCT WiMax driver version %s\n", DRIVER_VERSION);
+ dev_info(&func->dev, "Found GDM SDIO VID = 0x%04x PID = 0x%04x...\n",
+ func->vendor, func->device);
+ dev_info(&func->dev, "GCT WiMax driver version %s\n", DRIVER_VERSION);
sdio_claim_host(func);
sdio_enable_func(func);