git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create tag
[linux-2.6.git]
/
drivers
/
usb
/
misc
/
cytherm.c
diff --git
a/drivers/usb/misc/cytherm.c
b/drivers/usb/misc/cytherm.c
index
8ea6a74
..
4d27eab
100644
(file)
--- a/
drivers/usb/misc/cytherm.c
+++ b/
drivers/usb/misc/cytherm.c
@@
-46,9
+46,6
@@
struct usb_cytherm {
static int cytherm_probe(struct usb_interface *interface,
const struct usb_device_id *id);
static void cytherm_disconnect(struct usb_interface *interface);
static int cytherm_probe(struct usb_interface *interface,
const struct usb_device_id *id);
static void cytherm_disconnect(struct usb_interface *interface);
-int vendor_command(struct usb_device *dev, unsigned char request,
- unsigned char value, unsigned char index,
- void *buf, int size);
/* usb specific object needed to register this driver with the usb subsystem */
/* usb specific object needed to register this driver with the usb subsystem */
@@
-71,9
+68,9
@@
static struct usb_driver cytherm_driver = {
/* Send a vendor command to device */
/* Send a vendor command to device */
-int vendor_command(struct usb_device *dev, unsigned char request,
- unsigned char value, unsigned char index,
- void *buf, int size)
+
static
int vendor_command(struct usb_device *dev, unsigned char request,
+
unsigned char value, unsigned char index,
+
void *buf, int size)
{
return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
request,
{
return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
request,
@@
-122,12
+119,12
@@
static ssize_t set_brightness(struct device *dev, const char *buf,
retval = vendor_command(cytherm->udev, WRITE_RAM, BRIGHTNESS,
cytherm->brightness, buffer, 8);
if (retval)
retval = vendor_command(cytherm->udev, WRITE_RAM, BRIGHTNESS,
cytherm->brightness, buffer, 8);
if (retval)
- dev_dbg(&
led
->udev->dev, "retval = %d\n", retval);
+ dev_dbg(&
cytherm
->udev->dev, "retval = %d\n", retval);
/* Inform µC that we have changed the brightness setting */
retval = vendor_command(cytherm->udev, WRITE_RAM, BRIGHTNESS_SEM,
0x01, buffer, 8);
if (retval)
/* Inform µC that we have changed the brightness setting */
retval = vendor_command(cytherm->udev, WRITE_RAM, BRIGHTNESS_SEM,
0x01, buffer, 8);
if (retval)
- dev_dbg(&
led
->udev->dev, "retval = %d\n", retval);
+ dev_dbg(&
cytherm
->udev->dev, "retval = %d\n", retval);
kfree(buffer);
kfree(buffer);
@@
-161,13
+158,13
@@
static ssize_t show_temp(struct device *dev, char *buf)
/* read temperature */
retval = vendor_command(cytherm->udev, READ_RAM, TEMP, 0, buffer, 8);
if (retval)
/* read temperature */
retval = vendor_command(cytherm->udev, READ_RAM, TEMP, 0, buffer, 8);
if (retval)
- dev_dbg(&
led
->udev->dev, "retval = %d\n", retval);
+ dev_dbg(&
cytherm
->udev->dev, "retval = %d\n", retval);
temp = buffer[1];
/* read sign */
retval = vendor_command(cytherm->udev, READ_RAM, SIGN, 0, buffer, 8);
if (retval)
temp = buffer[1];
/* read sign */
retval = vendor_command(cytherm->udev, READ_RAM, SIGN, 0, buffer, 8);
if (retval)
- dev_dbg(&
led
->udev->dev, "retval = %d\n", retval);
+ dev_dbg(&
cytherm
->udev->dev, "retval = %d\n", retval);
sign = buffer[1];
kfree(buffer);
sign = buffer[1];
kfree(buffer);
@@
-205,7
+202,7
@@
static ssize_t show_button(struct device *dev, char *buf)
/* check button */
retval = vendor_command(cytherm->udev, READ_RAM, BUTTON, 0, buffer, 8);
if (retval)
/* check button */
retval = vendor_command(cytherm->udev, READ_RAM, BUTTON, 0, buffer, 8);
if (retval)
- dev_dbg(&
led
->udev->dev, "retval = %d\n", retval);
+ dev_dbg(&
cytherm
->udev->dev, "retval = %d\n", retval);
retval = buffer[1];
retval = buffer[1];
@@
-242,7
+239,7
@@
static ssize_t show_port0(struct device *dev, char *buf)
retval = vendor_command(cytherm->udev, READ_PORT, 0, 0, buffer, 8);
if (retval)
retval = vendor_command(cytherm->udev, READ_PORT, 0, 0, buffer, 8);
if (retval)
- dev_dbg(&
led
->udev->dev, "retval = %d\n", retval);
+ dev_dbg(&
cytherm
->udev->dev, "retval = %d\n", retval);
retval = buffer[1];
retval = buffer[1];
@@
-277,7
+274,7
@@
static ssize_t set_port0(struct device *dev, const char *buf, size_t count)
retval = vendor_command(cytherm->udev, WRITE_PORT, 0,
tmp, buffer, 8);
if (retval)
retval = vendor_command(cytherm->udev, WRITE_PORT, 0,
tmp, buffer, 8);
if (retval)
- dev_dbg(&
led
->udev->dev, "retval = %d\n", retval);
+ dev_dbg(&
cytherm
->udev->dev, "retval = %d\n", retval);
kfree(buffer);
kfree(buffer);
@@
-302,7
+299,7
@@
static ssize_t show_port1(struct device *dev, char *buf)
retval = vendor_command(cytherm->udev, READ_PORT, 1, 0, buffer, 8);
if (retval)
retval = vendor_command(cytherm->udev, READ_PORT, 1, 0, buffer, 8);
if (retval)
- dev_dbg(&
led
->udev->dev, "retval = %d\n", retval);
+ dev_dbg(&
cytherm
->udev->dev, "retval = %d\n", retval);
retval = buffer[1];
retval = buffer[1];
@@
-337,7
+334,7
@@
static ssize_t set_port1(struct device *dev, const char *buf, size_t count)
retval = vendor_command(cytherm->udev, WRITE_PORT, 1,
tmp, buffer, 8);
if (retval)
retval = vendor_command(cytherm->udev, WRITE_PORT, 1,
tmp, buffer, 8);
if (retval)
- dev_dbg(&
led
->udev->dev, "retval = %d\n", retval);
+ dev_dbg(&
cytherm
->udev->dev, "retval = %d\n", retval);
kfree(buffer);
kfree(buffer);