mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Merge ../linux-2.6
This commit is contained in:
commit
bac30d1a78
779 changed files with 22983 additions and 7760 deletions
|
|
@ -24,15 +24,15 @@
|
|||
#include "usb.h"
|
||||
|
||||
#define MAX_USB_MINORS 256
|
||||
static struct file_operations *usb_minors[MAX_USB_MINORS];
|
||||
static const struct file_operations *usb_minors[MAX_USB_MINORS];
|
||||
static DEFINE_SPINLOCK(minor_lock);
|
||||
|
||||
static int usb_open(struct inode * inode, struct file * file)
|
||||
{
|
||||
int minor = iminor(inode);
|
||||
struct file_operations *c;
|
||||
const struct file_operations *c;
|
||||
int err = -ENODEV;
|
||||
struct file_operations *old_fops, *new_fops = NULL;
|
||||
const struct file_operations *old_fops, *new_fops = NULL;
|
||||
|
||||
spin_lock (&minor_lock);
|
||||
c = usb_minors[minor];
|
||||
|
|
|
|||
|
|
@ -16,57 +16,7 @@
|
|||
#include <linux/mutex.h>
|
||||
#include "usb.h"
|
||||
|
||||
|
||||
static struct notifier_block *usb_notifier_list;
|
||||
static DEFINE_MUTEX(usb_notifier_lock);
|
||||
|
||||
static void usb_notifier_chain_register(struct notifier_block **list,
|
||||
struct notifier_block *n)
|
||||
{
|
||||
mutex_lock(&usb_notifier_lock);
|
||||
while (*list) {
|
||||
if (n->priority > (*list)->priority)
|
||||
break;
|
||||
list = &((*list)->next);
|
||||
}
|
||||
n->next = *list;
|
||||
*list = n;
|
||||
mutex_unlock(&usb_notifier_lock);
|
||||
}
|
||||
|
||||
static void usb_notifier_chain_unregister(struct notifier_block **nl,
|
||||
struct notifier_block *n)
|
||||
{
|
||||
mutex_lock(&usb_notifier_lock);
|
||||
while ((*nl)!=NULL) {
|
||||
if ((*nl)==n) {
|
||||
*nl = n->next;
|
||||
goto exit;
|
||||
}
|
||||
nl=&((*nl)->next);
|
||||
}
|
||||
exit:
|
||||
mutex_unlock(&usb_notifier_lock);
|
||||
}
|
||||
|
||||
static int usb_notifier_call_chain(struct notifier_block **n,
|
||||
unsigned long val, void *v)
|
||||
{
|
||||
int ret=NOTIFY_DONE;
|
||||
struct notifier_block *nb = *n;
|
||||
|
||||
mutex_lock(&usb_notifier_lock);
|
||||
while (nb) {
|
||||
ret = nb->notifier_call(nb,val,v);
|
||||
if (ret&NOTIFY_STOP_MASK) {
|
||||
goto exit;
|
||||
}
|
||||
nb = nb->next;
|
||||
}
|
||||
exit:
|
||||
mutex_unlock(&usb_notifier_lock);
|
||||
return ret;
|
||||
}
|
||||
static BLOCKING_NOTIFIER_HEAD(usb_notifier_list);
|
||||
|
||||
/**
|
||||
* usb_register_notify - register a notifier callback whenever a usb change happens
|
||||
|
|
@ -76,7 +26,7 @@ exit:
|
|||
*/
|
||||
void usb_register_notify(struct notifier_block *nb)
|
||||
{
|
||||
usb_notifier_chain_register(&usb_notifier_list, nb);
|
||||
blocking_notifier_chain_register(&usb_notifier_list, nb);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_register_notify);
|
||||
|
||||
|
|
@ -89,27 +39,28 @@ EXPORT_SYMBOL_GPL(usb_register_notify);
|
|||
*/
|
||||
void usb_unregister_notify(struct notifier_block *nb)
|
||||
{
|
||||
usb_notifier_chain_unregister(&usb_notifier_list, nb);
|
||||
blocking_notifier_chain_unregister(&usb_notifier_list, nb);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_unregister_notify);
|
||||
|
||||
|
||||
void usb_notify_add_device(struct usb_device *udev)
|
||||
{
|
||||
usb_notifier_call_chain(&usb_notifier_list, USB_DEVICE_ADD, udev);
|
||||
blocking_notifier_call_chain(&usb_notifier_list, USB_DEVICE_ADD, udev);
|
||||
}
|
||||
|
||||
void usb_notify_remove_device(struct usb_device *udev)
|
||||
{
|
||||
usb_notifier_call_chain(&usb_notifier_list, USB_DEVICE_REMOVE, udev);
|
||||
blocking_notifier_call_chain(&usb_notifier_list,
|
||||
USB_DEVICE_REMOVE, udev);
|
||||
}
|
||||
|
||||
void usb_notify_add_bus(struct usb_bus *ubus)
|
||||
{
|
||||
usb_notifier_call_chain(&usb_notifier_list, USB_BUS_ADD, ubus);
|
||||
blocking_notifier_call_chain(&usb_notifier_list, USB_BUS_ADD, ubus);
|
||||
}
|
||||
|
||||
void usb_notify_remove_bus(struct usb_bus *ubus)
|
||||
{
|
||||
usb_notifier_call_chain(&usb_notifier_list, USB_BUS_REMOVE, ubus);
|
||||
blocking_notifier_call_chain(&usb_notifier_list, USB_BUS_REMOVE, ubus);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1581,7 +1581,7 @@ restart:
|
|||
|
||||
static struct inode *
|
||||
gadgetfs_create_file (struct super_block *sb, char const *name,
|
||||
void *data, struct file_operations *fops,
|
||||
void *data, const struct file_operations *fops,
|
||||
struct dentry **dentry_p);
|
||||
|
||||
static int activate_ep_files (struct dev_data *dev)
|
||||
|
|
@ -1955,7 +1955,7 @@ module_param (default_perm, uint, 0644);
|
|||
|
||||
static struct inode *
|
||||
gadgetfs_make_inode (struct super_block *sb,
|
||||
void *data, struct file_operations *fops,
|
||||
void *data, const struct file_operations *fops,
|
||||
int mode)
|
||||
{
|
||||
struct inode *inode = new_inode (sb);
|
||||
|
|
@ -1979,7 +1979,7 @@ gadgetfs_make_inode (struct super_block *sb,
|
|||
*/
|
||||
static struct inode *
|
||||
gadgetfs_create_file (struct super_block *sb, char const *name,
|
||||
void *data, struct file_operations *fops,
|
||||
void *data, const struct file_operations *fops,
|
||||
struct dentry **dentry_p)
|
||||
{
|
||||
struct dentry *dentry;
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ static int ohci_s3c2410_hub_control (
|
|||
"s3c2410_hub_control(%p,0x%04x,0x%04x,0x%04x,%p,%04x)\n",
|
||||
hcd, typeReq, wValue, wIndex, buf, wLength);
|
||||
|
||||
/* if we are only an humble host without any special capabilites
|
||||
/* if we are only an humble host without any special capabilities
|
||||
* process the request straight away and exit */
|
||||
|
||||
if (info == NULL) {
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ static int blan_mdlm_bind(struct usbnet *dev, struct usb_interface *intf)
|
|||
* with devices that use it and those that don't.
|
||||
*/
|
||||
if ((detail->bDetailData[1] & ~0x02) != 0x01) {
|
||||
/* bmDataCapabilites == 0 would be fine too,
|
||||
/* bmDataCapabilities == 0 would be fine too,
|
||||
* but framing is minidriver-coupled for now.
|
||||
*/
|
||||
bad_detail:
|
||||
|
|
|
|||
Loading…
Reference in a new issue