Skip to content

Commit

Permalink
s/temp/temperature on the talk
Browse files Browse the repository at this point in the history
  • Loading branch information
gregkh committed Jun 10, 2009
1 parent 54af10b commit 38328d4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions talk/talk.mgp
Expand Up @@ -248,7 +248,7 @@ Device specific structure
%font "typewriter", size 5 %font "typewriter", size 5
struct gotemp { struct gotemp {
struct usb_device *udev; struct usb_device *udev;
int temp; int temperature;
}; };


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down Expand Up @@ -305,30 +305,30 @@ static void gotemp_disconnect(struct usb_interface *interface)
Make a sysfs file Make a sysfs file


%font "typewriter", size 3.5 %font "typewriter", size 3.5
static ssize_t show_temp(struct device *dev, static ssize_t show_temperature(struct device *dev,
struct device_attribute *attr, struct device_attribute *attr,
char *buf) char *buf)
{ {
struct usb_interface *intf = to_usb_interface(dev); struct usb_interface *intf = to_usb_interface(dev);
struct gotemp *gdev = usb_get_intfdata(intf); struct gotemp *gdev = usb_get_intfdata(intf);


return sprintf(buf, "%d\\n", gdev->temp); return sprintf(buf, "%d\\n", gdev->temperature);
} }
static DEVICE_ATTR(temp, S_IRUGO, show_temp, NULL); static DEVICE_ATTR(temperature, S_IRUGO, show_temperature, NULL);
%font "standard" %font "standard"


In In
%cont, font "typewriter", size 4 %cont, font "typewriter", size 4
gotemp_probe: gotemp_probe:
%font "typewriter", size 3.5 %font "typewriter", size 3.5
device_create_file(&interface->dev, &dev_attr_temp); device_create_file(&interface->dev, &dev_attr_temperature);


%font "standard" %font "standard"
In In
%cont, font "typewriter", size 4 %cont, font "typewriter", size 4
gotemp_disconnect: gotemp_disconnect:
%font "typewriter", size 3.5 %font "typewriter", size 3.5
device_remove_file(&interface->dev, &dev_attr_temp); device_remove_file(&interface->dev, &dev_attr_temperature);


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%page %page
Expand Down Expand Up @@ -412,7 +412,7 @@ urb in the device structure
%font "typewriter", size 4 %font "typewriter", size 4
struct gotemp { struct gotemp {
struct usb_device *udev; struct usb_device *udev;
int temp; int temperature;
unsigned char *int_in_buffer; unsigned char *int_in_buffer;
struct urb *int_in_urb; struct urb *int_in_urb;
}; };
Expand Down Expand Up @@ -481,7 +481,7 @@ init_dev():
/* kick off interrupt urb */ /* kick off interrupt urb */
retval = usb_submit_urb(gdev->int_in_urb, GFP_KERNEL); retval = usb_submit_urb(gdev->int_in_urb, GFP_KERNEL);
if (retval) if (retval)
dev_err(&gdev->udev->dev, dev_err(&gdev->udev->dev,
"Error %d submitting interrupt urb\\n", "Error %d submitting interrupt urb\\n",
retval); retval);


Expand Down Expand Up @@ -541,7 +541,7 @@ The urb callback
read_int_callback() continued: read_int_callback() continued:
%fore "black" %fore "black"


gdev->temp = le16_to_cpu(measurement->measurement0); gdev->temperature = le16_to_cpu(measurement->measurement0);


exit: exit:
retval = usb_submit_urb(urb, GFP_ATOMIC); retval = usb_submit_urb(urb, GFP_ATOMIC);
Expand Down

0 comments on commit 38328d4

Please sign in to comment.