-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 354298 b: refs/heads/master c: abac8b5 h: refs/heads/master v: v3
- Loading branch information
H Hartley Sweeten
authored and
Greg Kroah-Hartman
committed
Jan 31, 2013
1 parent
9994aeb
commit 24dc74e
Showing
9 changed files
with
152 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: ae5943de8c8c4438cbac5cda599ff0b88c224468 | ||
refs/heads/master: abac8b54a353b9a1ac7d09ff790812655f618896 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
comedi-y := comedi_fops.o range.o drivers.o \ | ||
comedi_buf.o | ||
comedi-$(CONFIG_PROC_FS) += proc.o | ||
comedi-$(CONFIG_COMPAT) += comedi_compat32.o | ||
comedi-y := comedi_fops.o range.o drivers.o \ | ||
comedi_buf.o | ||
comedi-$(CONFIG_COMEDI_USB_DRIVERS) += comedi_usb.o | ||
comedi-$(CONFIG_PROC_FS) += proc.o | ||
comedi-$(CONFIG_COMPAT) += comedi_compat32.o | ||
|
||
obj-$(CONFIG_COMEDI) += comedi.o | ||
obj-$(CONFIG_COMEDI) += comedi.o | ||
|
||
obj-$(CONFIG_COMEDI) += kcomedilib/ | ||
obj-$(CONFIG_COMEDI) += drivers/ | ||
obj-$(CONFIG_COMEDI) += kcomedilib/ | ||
obj-$(CONFIG_COMEDI) += drivers/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
/* | ||
* comedi_usb.c | ||
* Comedi USB driver specific functions. | ||
* | ||
* COMEDI - Linux Control and Measurement Device Interface | ||
* Copyright (C) 1997-2000 David A. Schleef <ds@schleef.org> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
*/ | ||
|
||
#include <linux/usb.h> | ||
|
||
#include "comedidev.h" | ||
|
||
/** | ||
* comedi_to_usb_interface() - comedi_device pointer to usb_interface pointer. | ||
* @dev: comedi_device struct | ||
*/ | ||
struct usb_interface *comedi_to_usb_interface(struct comedi_device *dev) | ||
{ | ||
return dev->hw_dev ? to_usb_interface(dev->hw_dev) : NULL; | ||
} | ||
EXPORT_SYMBOL_GPL(comedi_to_usb_interface); | ||
|
||
/** | ||
* comedi_usb_auto_config() - Configure/probe a comedi USB driver. | ||
* @intf: usb_interface struct | ||
* @driver: comedi_driver struct | ||
* | ||
* Typically called from the usb_driver (*probe) function. | ||
*/ | ||
int comedi_usb_auto_config(struct usb_interface *intf, | ||
struct comedi_driver *driver) | ||
{ | ||
return comedi_auto_config(&intf->dev, driver, 0); | ||
} | ||
EXPORT_SYMBOL_GPL(comedi_usb_auto_config); | ||
|
||
/** | ||
* comedi_pci_auto_unconfig() - Unconfigure/disconnect a comedi USB driver. | ||
* @intf: usb_interface struct | ||
* | ||
* Typically called from the usb_driver (*disconnect) function. | ||
*/ | ||
void comedi_usb_auto_unconfig(struct usb_interface *intf) | ||
{ | ||
comedi_auto_unconfig(&intf->dev); | ||
} | ||
EXPORT_SYMBOL_GPL(comedi_usb_auto_unconfig); | ||
|
||
/** | ||
* comedi_usb_driver_register() - Register a comedi USB driver. | ||
* @comedi_driver: comedi_driver struct | ||
* @usb_driver: usb_driver struct | ||
* | ||
* This function is used for the module_init() of comedi USB drivers. | ||
* Do not call it directly, use the module_comedi_usb_driver() helper | ||
* macro instead. | ||
*/ | ||
int comedi_usb_driver_register(struct comedi_driver *comedi_driver, | ||
struct usb_driver *usb_driver) | ||
{ | ||
int ret; | ||
|
||
ret = comedi_driver_register(comedi_driver); | ||
if (ret < 0) | ||
return ret; | ||
|
||
ret = usb_register(usb_driver); | ||
if (ret < 0) { | ||
comedi_driver_unregister(comedi_driver); | ||
return ret; | ||
} | ||
|
||
return 0; | ||
} | ||
EXPORT_SYMBOL_GPL(comedi_usb_driver_register); | ||
|
||
/** | ||
* comedi_usb_driver_unregister() - Unregister a comedi USB driver. | ||
* @comedi_driver: comedi_driver struct | ||
* @usb_driver: usb_driver struct | ||
* | ||
* This function is used for the module_exit() of comedi USB drivers. | ||
* Do not call it directly, use the module_comedi_usb_driver() helper | ||
* macro instead. | ||
*/ | ||
void comedi_usb_driver_unregister(struct comedi_driver *comedi_driver, | ||
struct usb_driver *usb_driver) | ||
{ | ||
usb_deregister(usb_driver); | ||
comedi_driver_unregister(comedi_driver); | ||
} | ||
EXPORT_SYMBOL_GPL(comedi_usb_driver_unregister); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters