Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1500446
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 15/18] [media] RedRat3: Delete two variables in redrat3_set_timeout() |
| Date | 2016-10-13 18:50 +0200 |
| Message-ID | <srRmF-5Xf-19@gated-at.bofh.it> (permalink) |
| References | <qEuGl-43C-5@gated-at.bofh.it> <srR3j-5Qh-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 13 Oct 2016 15:40:33 +0200
* Use the data structure members "dev" and "udev" directly
without assigning them to intermediate variables.
Thus delete the extra variable definitions at the beginning.
* Fix indentation for the parameters of two function calls.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/rc/redrat3.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c
index 055f214..e46a92a 100644
--- a/drivers/media/rc/redrat3.c
+++ b/drivers/media/rc/redrat3.c
@@ -476,8 +476,6 @@ static u32 redrat3_get_timeout(struct redrat3_dev *rr3)
static int redrat3_set_timeout(struct rc_dev *rc_dev, unsigned int timeoutns)
{
struct redrat3_dev *rr3 = rc_dev->priv;
- struct usb_device *udev = rr3->udev;
- struct device *dev = rr3->dev;
__be32 *timeout;
int ret;
@@ -486,13 +484,17 @@ static int redrat3_set_timeout(struct rc_dev *rc_dev, unsigned int timeoutns)
return -ENOMEM;
*timeout = cpu_to_be32(redrat3_us_to_len(timeoutns / 1000));
- ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), RR3_SET_IR_PARAM,
- USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
- RR3_IR_IO_SIG_TIMEOUT, 0, timeout, sizeof(*timeout),
- HZ * 25);
- dev_dbg(dev, "set ir parm timeout %d ret 0x%02x\n",
- be32_to_cpu(*timeout), ret);
-
+ ret = usb_control_msg(rr3->udev,
+ usb_sndctrlpipe(rr3->udev, 0),
+ RR3_SET_IR_PARAM,
+ USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
+ RR3_IR_IO_SIG_TIMEOUT,
+ 0,
+ timeout,
+ sizeof(*timeout),
+ HZ * 25);
+ dev_dbg(rr3->dev, "set ir parm timeout %d ret 0x%02x\n",
+ be32_to_cpu(*timeout), ret);
if (ret == sizeof(*timeout)) {
rr3->hw_timeout = timeoutns / 1000;
ret = 0;
--
2.10.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 15/18] [media] RedRat3: Delete two variables in redrat3_set_timeout() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-13 18:50 +0200
csiph-web