diff options
author | Antti Palosaari <crope@iki.fi> | 2012-09-12 19:23:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-09-23 19:50:42 -0400 |
commit | b072eee0345efd3edb582466c627364b5fa63a99 (patch) | |
tree | 2155b331f3e262cb7ed53fc2fe2f37a8e05af62c /drivers/media | |
parent | 3cedcab88f6ef96bcbe0c70d15c5d841086f9d43 (diff) |
[media] ce6230: use Kernel dev_foo() logging
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/ce6230.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/ce6230.c b/drivers/media/usb/dvb-usb-v2/ce6230.c index 1c4357d804ff..f67b14bc32e3 100644 --- a/drivers/media/usb/dvb-usb-v2/ce6230.c +++ b/drivers/media/usb/dvb-usb-v2/ce6230.c | |||
@@ -49,7 +49,8 @@ static int ce6230_ctrl_msg(struct dvb_usb_device *d, struct usb_req *req) | |||
49 | requesttype = (USB_TYPE_VENDOR | USB_DIR_OUT); | 49 | requesttype = (USB_TYPE_VENDOR | USB_DIR_OUT); |
50 | break; | 50 | break; |
51 | default: | 51 | default: |
52 | pr_debug("%s: unknown command=%02x\n", __func__, req->cmd); | 52 | dev_err(&d->udev->dev, "%s: unknown command=%02x\n", |
53 | KBUILD_MODNAME, req->cmd); | ||
53 | ret = -EINVAL; | 54 | ret = -EINVAL; |
54 | goto error; | 55 | goto error; |
55 | } | 56 | } |
@@ -78,8 +79,8 @@ static int ce6230_ctrl_msg(struct dvb_usb_device *d, struct usb_req *req) | |||
78 | buf, req->data_len); | 79 | buf, req->data_len); |
79 | 80 | ||
80 | if (ret < 0) | 81 | if (ret < 0) |
81 | pr_err("%s: usb_control_msg() failed=%d\n", KBUILD_MODNAME, | 82 | dev_err(&d->udev->dev, "%s: usb_control_msg() failed=%d\n", |
82 | ret); | 83 | KBUILD_MODNAME, ret); |
83 | else | 84 | else |
84 | ret = 0; | 85 | ret = 0; |
85 | 86 | ||
@@ -121,7 +122,8 @@ static int ce6230_i2c_master_xfer(struct i2c_adapter *adap, | |||
121 | req.data = &msg[i+1].buf[0]; | 122 | req.data = &msg[i+1].buf[0]; |
122 | ret = ce6230_ctrl_msg(d, &req); | 123 | ret = ce6230_ctrl_msg(d, &req); |
123 | } else { | 124 | } else { |
124 | pr_err("%s: I2C read not implemented\n", | 125 | dev_err(&d->udev->dev, "%s: I2C read not " \ |
126 | "implemented\n", | ||
125 | KBUILD_MODNAME); | 127 | KBUILD_MODNAME); |
126 | ret = -EOPNOTSUPP; | 128 | ret = -EOPNOTSUPP; |
127 | } | 129 | } |
@@ -176,10 +178,12 @@ static struct zl10353_config ce6230_zl10353_config = { | |||
176 | 178 | ||
177 | static int ce6230_zl10353_frontend_attach(struct dvb_usb_adapter *adap) | 179 | static int ce6230_zl10353_frontend_attach(struct dvb_usb_adapter *adap) |
178 | { | 180 | { |
179 | pr_debug("%s:\n", __func__); | 181 | struct dvb_usb_device *d = adap_to_d(adap); |
182 | |||
183 | dev_dbg(&d->udev->dev, "%s:\n", __func__); | ||
180 | 184 | ||
181 | adap->fe[0] = dvb_attach(zl10353_attach, &ce6230_zl10353_config, | 185 | adap->fe[0] = dvb_attach(zl10353_attach, &ce6230_zl10353_config, |
182 | &adap_to_d(adap)->i2c_adap); | 186 | &d->i2c_adap); |
183 | if (adap->fe[0] == NULL) | 187 | if (adap->fe[0] == NULL) |
184 | return -ENODEV; | 188 | return -ENODEV; |
185 | 189 | ||
@@ -205,12 +209,12 @@ static struct mxl5005s_config ce6230_mxl5003s_config = { | |||
205 | 209 | ||
206 | static int ce6230_mxl5003s_tuner_attach(struct dvb_usb_adapter *adap) | 210 | static int ce6230_mxl5003s_tuner_attach(struct dvb_usb_adapter *adap) |
207 | { | 211 | { |
212 | struct dvb_usb_device *d = adap_to_d(adap); | ||
208 | int ret; | 213 | int ret; |
209 | 214 | ||
210 | pr_debug("%s:\n", __func__); | 215 | dev_dbg(&d->udev->dev, "%s:\n", __func__); |
211 | 216 | ||
212 | ret = dvb_attach(mxl5005s_attach, adap->fe[0], | 217 | ret = dvb_attach(mxl5005s_attach, adap->fe[0], &d->i2c_adap, |
213 | &adap_to_d(adap)->i2c_adap, | ||
214 | &ce6230_mxl5003s_config) == NULL ? -ENODEV : 0; | 218 | &ce6230_mxl5003s_config) == NULL ? -ENODEV : 0; |
215 | return ret; | 219 | return ret; |
216 | } | 220 | } |
@@ -219,14 +223,14 @@ static int ce6230_power_ctrl(struct dvb_usb_device *d, int onoff) | |||
219 | { | 223 | { |
220 | int ret; | 224 | int ret; |
221 | 225 | ||
222 | pr_debug("%s: onoff=%d\n", __func__, onoff); | 226 | dev_dbg(&d->udev->dev, "%s: onoff=%d\n", __func__, onoff); |
223 | 227 | ||
224 | /* InterfaceNumber 1 / AlternateSetting 0 idle | 228 | /* InterfaceNumber 1 / AlternateSetting 0 idle |
225 | InterfaceNumber 1 / AlternateSetting 1 streaming */ | 229 | InterfaceNumber 1 / AlternateSetting 1 streaming */ |
226 | ret = usb_set_interface(d->udev, 1, onoff); | 230 | ret = usb_set_interface(d->udev, 1, onoff); |
227 | if (ret) | 231 | if (ret) |
228 | pr_err("%s: usb_set_interface() failed=%d\n", KBUILD_MODNAME, | 232 | dev_err(&d->udev->dev, "%s: usb_set_interface() failed=%d\n", |
229 | ret); | 233 | KBUILD_MODNAME, ret); |
230 | 234 | ||
231 | return ret; | 235 | return ret; |
232 | } | 236 | } |