From: Alexey Klimov <klimov.linux@gmail.com>
To: video4linux-list@redhat.com
Subject: Re: [patch] radio-mr800: remove warn- and err- messages
Date: Tue, 28 Oct 2008 21:05:53 +0300 [thread overview]
Message-ID: <20081028180552.GA2677@tux> (raw)
In-Reply-To: <30353c3d0810191711y7be7c7f2i83d6a3a8ff46b6a0@mail.gmail.com>
Hello, all
Here is new patch, reformatted. Also KBUILD_MODNAME added.
radio-mr800: remove warn-, err- and info-messages
Patch removes warn(), err() and info() statements in radio/radio-mr800.c,
and place dev_warn, dev_info in right places.
Printk changed on pr_info and pr_err macro.
Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
---
diff -r 0b2679b688fe linux/drivers/media/radio/radio-mr800.c
--- a/linux/drivers/media/radio/radio-mr800.c Tue Oct 28 14:15:21 2008 +0300
+++ b/linux/drivers/media/radio/radio-mr800.c Tue Oct 28 20:49:54 2008 +0300
@@ -362,7 +362,8 @@
radio->curfreq = f->frequency;
if (amradio_setfreq(radio, radio->curfreq) < 0)
- warn("Set frequency failed");
+ dev_warn(&radio->videodev->dev,
+ KBUILD_MODNAME " - set frequency failed\n");
return 0;
}
@@ -385,8 +386,7 @@
for (i = 0; i < ARRAY_SIZE(radio_qctrl); i++) {
if (qc->id && qc->id == radio_qctrl[i].id) {
- memcpy(qc, &(radio_qctrl[i]),
- sizeof(*qc));
+ memcpy(qc, &(radio_qctrl[i]), sizeof(*qc));
return 0;
}
}
@@ -417,12 +417,16 @@
case V4L2_CID_AUDIO_MUTE:
if (ctrl->value) {
if (amradio_stop(radio) < 0) {
- warn("amradio_stop() failed");
+ dev_warn(&radio->videodev->dev,
+ KBUILD_MODNAME
+ " - amradio_stop failed\n");
return -1;
}
} else {
if (amradio_start(radio) < 0) {
- warn("amradio_start() failed");
+ dev_warn(&radio->videodev->dev,
+ KBUILD_MODNAME
+ " - amradio_start failed\n");
return -1;
}
}
@@ -478,13 +482,15 @@
radio->muted = 1;
if (amradio_start(radio) < 0) {
- warn("Radio did not start up properly");
+ dev_warn(&radio->videodev->dev,
+ KBUILD_MODNAME " - radio did not start up properly\n");
radio->users = 0;
unlock_kernel();
return -EIO;
}
if (amradio_setfreq(radio, radio->curfreq) < 0)
- warn("Set frequency failed");
+ dev_warn(&radio->videodev->dev,
+ KBUILD_MODNAME " - set frequency failed\n");
unlock_kernel();
return 0;
@@ -511,9 +517,9 @@
struct amradio_device *radio = usb_get_intfdata(intf);
if (amradio_stop(radio) < 0)
- warn("amradio_stop() failed");
+ dev_warn(&intf->dev, "amradio_stop failed\n");
- info("radio-mr800: Going into suspend..");
+ dev_info(&intf->dev, "going into suspend..\n");
return 0;
}
@@ -524,9 +530,9 @@
struct amradio_device *radio = usb_get_intfdata(intf);
if (amradio_start(radio) < 0)
- warn("amradio_start() failed");
+ dev_warn(&intf->dev, "amradio_start failed\n");
- info("radio-mr800: Coming out of suspend..");
+ dev_info(&intf->dev, "coming out of suspend..\n");
return 0;
}
@@ -605,7 +611,7 @@
video_set_drvdata(radio->videodev, radio);
if (video_register_device(radio->videodev, VFL_TYPE_RADIO, radio_nr)) {
- warn("Could not register video device");
+ dev_warn(&intf->dev, "could not register video device\n");
video_device_release(radio->videodev);
kfree(radio->buffer);
kfree(radio);
@@ -620,9 +626,13 @@
{
int retval = usb_register(&usb_amradio_driver);
- info(DRIVER_VERSION " " DRIVER_DESC);
+ pr_info(KBUILD_MODNAME
+ ": version " DRIVER_VERSION " " DRIVER_DESC "\n");
+
if (retval)
- err("usb_register failed. Error number %d", retval);
+ pr_err(KBUILD_MODNAME
+ ": usb_register failed. Error number %d\n", retval);
+
return retval;
}
--
--
Best regards, Klimov Alexey
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2008-10-28 18:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-16 18:46 [patch] radio-mr800: remove warn- and err- messages Alexey Klimov
2008-10-16 19:17 ` David Ellingsworth
2008-10-16 19:29 ` Michael Krufky
2008-10-19 14:58 ` Alexey Klimov
2008-10-20 0:11 ` David Ellingsworth
2008-10-28 18:05 ` Alexey Klimov [this message]
2008-10-29 3:17 ` Douglas Schilling Landgraf
2008-10-29 17:08 ` David Ellingsworth
2008-10-29 17:12 ` David Ellingsworth
2008-11-02 22:52 ` Alexey Klimov
2008-11-03 16:02 ` Alexey Klimov
2008-11-03 16:19 ` David Ellingsworth
[not found] ` <490F2AE8.2060002@personnelware.com>
2008-11-03 17:01 ` David Ellingsworth
2008-11-03 17:24 ` Alexey Klimov
2008-11-03 17:36 ` David Ellingsworth
2008-11-03 17:51 ` Alexey Klimov
2008-11-03 18:21 ` David Ellingsworth
2008-11-04 15:02 ` [PATCH 1/1] radio-mr800: remove warn, info and err messages Alexey Klimov
2008-11-04 19:54 ` David Ellingsworth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081028180552.GA2677@tux \
--to=klimov.linux@gmail.com \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.