Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh/urgent
This commit is contained in:
37
include/linux/atomic.h
Normal file
37
include/linux/atomic.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifndef _LINUX_ATOMIC_H
|
||||
#define _LINUX_ATOMIC_H
|
||||
#include <asm/atomic.h>
|
||||
|
||||
/**
|
||||
* atomic_inc_not_zero_hint - increment if not null
|
||||
* @v: pointer of type atomic_t
|
||||
* @hint: probable value of the atomic before the increment
|
||||
*
|
||||
* This version of atomic_inc_not_zero() gives a hint of probable
|
||||
* value of the atomic. This helps processor to not read the memory
|
||||
* before doing the atomic read/modify/write cycle, lowering
|
||||
* number of bus transactions on some arches.
|
||||
*
|
||||
* Returns: 0 if increment was not done, 1 otherwise.
|
||||
*/
|
||||
#ifndef atomic_inc_not_zero_hint
|
||||
static inline int atomic_inc_not_zero_hint(atomic_t *v, int hint)
|
||||
{
|
||||
int val, c = hint;
|
||||
|
||||
/* sanity test, should be removed by compiler if hint is a constant */
|
||||
if (!hint)
|
||||
return atomic_inc_not_zero(v);
|
||||
|
||||
do {
|
||||
val = atomic_cmpxchg(v, c, c + 1);
|
||||
if (val == c)
|
||||
return 1;
|
||||
c = val;
|
||||
} while (c);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_ATOMIC_H */
|
||||
@@ -66,10 +66,6 @@
|
||||
#define bio_offset(bio) bio_iovec((bio))->bv_offset
|
||||
#define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx)
|
||||
#define bio_sectors(bio) ((bio)->bi_size >> 9)
|
||||
#define bio_empty_barrier(bio) \
|
||||
((bio->bi_rw & REQ_HARDBARRIER) && \
|
||||
!bio_has_data(bio) && \
|
||||
!(bio->bi_rw & REQ_DISCARD))
|
||||
|
||||
static inline unsigned int bio_cur_bytes(struct bio *bio)
|
||||
{
|
||||
|
||||
@@ -122,7 +122,6 @@ enum rq_flag_bits {
|
||||
__REQ_FAILFAST_TRANSPORT, /* no driver retries of transport errors */
|
||||
__REQ_FAILFAST_DRIVER, /* no driver retries of driver errors */
|
||||
|
||||
__REQ_HARDBARRIER, /* may not be passed by drive either */
|
||||
__REQ_SYNC, /* request is sync (sync write or read) */
|
||||
__REQ_META, /* metadata io request */
|
||||
__REQ_DISCARD, /* request to discard sectors */
|
||||
@@ -159,7 +158,6 @@ enum rq_flag_bits {
|
||||
#define REQ_FAILFAST_DEV (1 << __REQ_FAILFAST_DEV)
|
||||
#define REQ_FAILFAST_TRANSPORT (1 << __REQ_FAILFAST_TRANSPORT)
|
||||
#define REQ_FAILFAST_DRIVER (1 << __REQ_FAILFAST_DRIVER)
|
||||
#define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER)
|
||||
#define REQ_SYNC (1 << __REQ_SYNC)
|
||||
#define REQ_META (1 << __REQ_META)
|
||||
#define REQ_DISCARD (1 << __REQ_DISCARD)
|
||||
@@ -168,8 +166,8 @@ enum rq_flag_bits {
|
||||
#define REQ_FAILFAST_MASK \
|
||||
(REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER)
|
||||
#define REQ_COMMON_MASK \
|
||||
(REQ_WRITE | REQ_FAILFAST_MASK | REQ_HARDBARRIER | REQ_SYNC | \
|
||||
REQ_META | REQ_DISCARD | REQ_NOIDLE | REQ_FLUSH | REQ_FUA)
|
||||
(REQ_WRITE | REQ_FAILFAST_MASK | REQ_SYNC | REQ_META | REQ_DISCARD | \
|
||||
REQ_NOIDLE | REQ_FLUSH | REQ_FUA)
|
||||
#define REQ_CLONE_MASK REQ_COMMON_MASK
|
||||
|
||||
#define REQ_UNPLUG (1 << __REQ_UNPLUG)
|
||||
|
||||
@@ -552,8 +552,7 @@ static inline void blk_clear_queue_full(struct request_queue *q, int sync)
|
||||
* it already be started by driver.
|
||||
*/
|
||||
#define RQ_NOMERGE_FLAGS \
|
||||
(REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER | \
|
||||
REQ_FLUSH | REQ_FUA)
|
||||
(REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA)
|
||||
#define rq_mergeable(rq) \
|
||||
(!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \
|
||||
(((rq)->cmd_flags & REQ_DISCARD) || \
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
|
||||
extern const char *drbd_buildtag(void);
|
||||
#define REL_VERSION "8.3.9rc2"
|
||||
#define REL_VERSION "8.3.9"
|
||||
#define API_VERSION 88
|
||||
#define PRO_VERSION_MIN 86
|
||||
#define PRO_VERSION_MAX 95
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/hardirq.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Analog Devices ADP5588 I/O Expander and QWERTY Keypad Controller
|
||||
*
|
||||
* Copyright 2009 Analog Devices Inc.
|
||||
* Copyright 2009-2010 Analog Devices Inc.
|
||||
*
|
||||
* Licensed under the GPL-2 or later.
|
||||
*/
|
||||
@@ -77,13 +77,26 @@
|
||||
/* Configuration Register1 */
|
||||
#define ADP5588_AUTO_INC (1 << 7)
|
||||
#define ADP5588_GPIEM_CFG (1 << 6)
|
||||
#define ADP5588_OVR_FLOW_M (1 << 5)
|
||||
#define ADP5588_INT_CFG (1 << 4)
|
||||
#define ADP5588_OVR_FLOW_IEN (1 << 3)
|
||||
#define ADP5588_K_LCK_IM (1 << 2)
|
||||
#define ADP5588_GPI_IEN (1 << 1)
|
||||
#define ADP5588_KE_IEN (1 << 0)
|
||||
|
||||
/* Interrupt Status Register */
|
||||
#define ADP5588_CMP2_INT (1 << 5)
|
||||
#define ADP5588_CMP1_INT (1 << 4)
|
||||
#define ADP5588_OVR_FLOW_INT (1 << 3)
|
||||
#define ADP5588_K_LCK_INT (1 << 2)
|
||||
#define ADP5588_GPI_INT (1 << 1)
|
||||
#define ADP5588_KE_INT (1 << 0)
|
||||
|
||||
/* Key Lock and Event Counter Register */
|
||||
#define ADP5588_K_LCK_EN (1 << 6)
|
||||
#define ADP5588_LCK21 0x30
|
||||
#define ADP5588_KEC 0xF
|
||||
|
||||
#define ADP5588_MAXGPIO 18
|
||||
#define ADP5588_BANK(offs) ((offs) >> 3)
|
||||
#define ADP5588_BIT(offs) (1u << ((offs) & 0x7))
|
||||
|
||||
@@ -339,6 +339,31 @@ static inline int vlan_get_tag(const struct sk_buff *skb, u16 *vlan_tci)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* vlan_get_protocol - get protocol EtherType.
|
||||
* @skb: skbuff to query
|
||||
*
|
||||
* Returns the EtherType of the packet, regardless of whether it is
|
||||
* vlan encapsulated (normal or hardware accelerated) or not.
|
||||
*/
|
||||
static inline __be16 vlan_get_protocol(const struct sk_buff *skb)
|
||||
{
|
||||
__be16 protocol = 0;
|
||||
|
||||
if (vlan_tx_tag_present(skb) ||
|
||||
skb->protocol != cpu_to_be16(ETH_P_8021Q))
|
||||
protocol = skb->protocol;
|
||||
else {
|
||||
__be16 proto, *protop;
|
||||
protop = skb_header_pointer(skb, offsetof(struct vlan_ethhdr,
|
||||
h_vlan_encapsulated_proto),
|
||||
sizeof(proto), &proto);
|
||||
if (likely(protop))
|
||||
protocol = *protop;
|
||||
}
|
||||
|
||||
return protocol;
|
||||
}
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
/* VLAN IOCTLs are found in sockios.h */
|
||||
|
||||
@@ -1406,6 +1406,8 @@ static inline void input_set_drvdata(struct input_dev *dev, void *data)
|
||||
int __must_check input_register_device(struct input_dev *);
|
||||
void input_unregister_device(struct input_dev *);
|
||||
|
||||
void input_reset_device(struct input_dev *);
|
||||
|
||||
int __must_check input_register_handler(struct input_handler *);
|
||||
void input_unregister_handler(struct input_handler *);
|
||||
|
||||
@@ -1421,7 +1423,7 @@ void input_release_device(struct input_handle *);
|
||||
int input_open_device(struct input_handle *);
|
||||
void input_close_device(struct input_handle *);
|
||||
|
||||
int input_flush_device(struct input_handle* handle, struct file* file);
|
||||
int input_flush_device(struct input_handle *handle, struct file *file);
|
||||
|
||||
void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
|
||||
void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value);
|
||||
|
||||
@@ -76,7 +76,6 @@ int put_io_context(struct io_context *ioc);
|
||||
void exit_io_context(struct task_struct *task);
|
||||
struct io_context *get_io_context(gfp_t gfp_flags, int node);
|
||||
struct io_context *alloc_io_context(gfp_t gfp_flags, int node);
|
||||
void copy_io_context(struct io_context **pdst, struct io_context **psrc);
|
||||
#else
|
||||
static inline void exit_io_context(struct task_struct *task)
|
||||
{
|
||||
|
||||
@@ -60,7 +60,7 @@ extern const char linux_proc_banner[];
|
||||
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
|
||||
#define roundup(x, y) ( \
|
||||
{ \
|
||||
typeof(y) __y = y; \
|
||||
const typeof(y) __y = y; \
|
||||
(((x) + (__y - 1)) / __y) * __y; \
|
||||
} \
|
||||
)
|
||||
@@ -293,6 +293,7 @@ extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
|
||||
unsigned int interval_msec);
|
||||
|
||||
extern int printk_delay_msec;
|
||||
extern int dmesg_restrict;
|
||||
|
||||
/*
|
||||
* Print a one-time message (analogous to WARN_ONCE() et al):
|
||||
|
||||
47
include/linux/leds-lp5521.h
Normal file
47
include/linux/leds-lp5521.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* LP5521 LED chip driver.
|
||||
*
|
||||
* Copyright (C) 2010 Nokia Corporation
|
||||
*
|
||||
* Contact: Samu Onkalo <samu.p.onkalo@nokia.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* 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., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_LP5521_H
|
||||
#define __LINUX_LP5521_H
|
||||
|
||||
/* See Documentation/leds/leds-lp5521.txt */
|
||||
|
||||
struct lp5521_led_config {
|
||||
u8 chan_nr;
|
||||
u8 led_current; /* mA x10, 0 if led is not connected */
|
||||
u8 max_current;
|
||||
};
|
||||
|
||||
#define LP5521_CLOCK_AUTO 0
|
||||
#define LP5521_CLOCK_INT 1
|
||||
#define LP5521_CLOCK_EXT 2
|
||||
|
||||
struct lp5521_platform_data {
|
||||
struct lp5521_led_config *led_config;
|
||||
u8 num_channels;
|
||||
u8 clock_mode;
|
||||
int (*setup_resources)(void);
|
||||
void (*release_resources)(void);
|
||||
void (*enable)(bool state);
|
||||
};
|
||||
|
||||
#endif /* __LINUX_LP5521_H */
|
||||
47
include/linux/leds-lp5523.h
Normal file
47
include/linux/leds-lp5523.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* LP5523 LED Driver
|
||||
*
|
||||
* Copyright (C) 2010 Nokia Corporation
|
||||
*
|
||||
* Contact: Samu Onkalo <samu.p.onkalo@nokia.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* 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., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_LP5523_H
|
||||
#define __LINUX_LP5523_H
|
||||
|
||||
/* See Documentation/leds/leds-lp5523.txt */
|
||||
|
||||
struct lp5523_led_config {
|
||||
u8 chan_nr;
|
||||
u8 led_current; /* mA x10, 0 if led is not connected */
|
||||
u8 max_current;
|
||||
};
|
||||
|
||||
#define LP5523_CLOCK_AUTO 0
|
||||
#define LP5523_CLOCK_INT 1
|
||||
#define LP5523_CLOCK_EXT 2
|
||||
|
||||
struct lp5523_platform_data {
|
||||
struct lp5523_led_config *led_config;
|
||||
u8 num_channels;
|
||||
u8 clock_mode;
|
||||
int (*setup_resources)(void);
|
||||
void (*release_resources)(void);
|
||||
void (*enable)(bool state);
|
||||
};
|
||||
|
||||
#endif /* __LINUX_LP5523_H */
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/rwsem.h>
|
||||
#include <linux/timer.h>
|
||||
|
||||
struct device;
|
||||
/*
|
||||
@@ -45,10 +46,14 @@ struct led_classdev {
|
||||
/* Get LED brightness level */
|
||||
enum led_brightness (*brightness_get)(struct led_classdev *led_cdev);
|
||||
|
||||
/* Activate hardware accelerated blink, delays are in
|
||||
* miliseconds and if none is provided then a sensible default
|
||||
* should be chosen. The call can adjust the timings if it can't
|
||||
* match the values specified exactly. */
|
||||
/*
|
||||
* Activate hardware accelerated blink, delays are in milliseconds
|
||||
* and if both are zero then a sensible default should be chosen.
|
||||
* The call should adjust the timings in that case and if it can't
|
||||
* match the values specified exactly.
|
||||
* Deactivate blinking again when the brightness is set to a fixed
|
||||
* value via the brightness_set() callback.
|
||||
*/
|
||||
int (*blink_set)(struct led_classdev *led_cdev,
|
||||
unsigned long *delay_on,
|
||||
unsigned long *delay_off);
|
||||
@@ -57,6 +62,10 @@ struct led_classdev {
|
||||
struct list_head node; /* LED Device list */
|
||||
const char *default_trigger; /* Trigger to use */
|
||||
|
||||
unsigned long blink_delay_on, blink_delay_off;
|
||||
struct timer_list blink_timer;
|
||||
int blink_brightness;
|
||||
|
||||
#ifdef CONFIG_LEDS_TRIGGERS
|
||||
/* Protects the trigger data below */
|
||||
struct rw_semaphore trigger_lock;
|
||||
@@ -73,6 +82,36 @@ extern void led_classdev_unregister(struct led_classdev *led_cdev);
|
||||
extern void led_classdev_suspend(struct led_classdev *led_cdev);
|
||||
extern void led_classdev_resume(struct led_classdev *led_cdev);
|
||||
|
||||
/**
|
||||
* led_blink_set - set blinking with software fallback
|
||||
* @led_cdev: the LED to start blinking
|
||||
* @delay_on: the time it should be on (in ms)
|
||||
* @delay_off: the time it should ble off (in ms)
|
||||
*
|
||||
* This function makes the LED blink, attempting to use the
|
||||
* hardware acceleration if possible, but falling back to
|
||||
* software blinking if there is no hardware blinking or if
|
||||
* the LED refuses the passed values.
|
||||
*
|
||||
* Note that if software blinking is active, simply calling
|
||||
* led_cdev->brightness_set() will not stop the blinking,
|
||||
* use led_classdev_brightness_set() instead.
|
||||
*/
|
||||
extern void led_blink_set(struct led_classdev *led_cdev,
|
||||
unsigned long *delay_on,
|
||||
unsigned long *delay_off);
|
||||
/**
|
||||
* led_brightness_set - set LED brightness
|
||||
* @led_cdev: the LED to set
|
||||
* @brightness: the brightness to set it to
|
||||
*
|
||||
* Set an LED's brightness, and, if necessary, cancel the
|
||||
* software blink timer that implements blinking when the
|
||||
* hardware doesn't.
|
||||
*/
|
||||
extern void led_brightness_set(struct led_classdev *led_cdev,
|
||||
enum led_brightness brightness);
|
||||
|
||||
/*
|
||||
* LED Triggers
|
||||
*/
|
||||
|
||||
@@ -1554,6 +1554,11 @@ static inline void netif_tx_wake_all_queues(struct net_device *dev)
|
||||
|
||||
static inline void netif_tx_stop_queue(struct netdev_queue *dev_queue)
|
||||
{
|
||||
if (WARN_ON(!dev_queue)) {
|
||||
printk(KERN_INFO "netif_stop_queue() cannot be called before "
|
||||
"register_netdev()");
|
||||
return;
|
||||
}
|
||||
set_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
|
||||
}
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ NF_HOOK_COND(uint8_t pf, unsigned int hook, struct sk_buff *skb,
|
||||
int ret;
|
||||
|
||||
if (!cond ||
|
||||
(ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, INT_MIN) == 1))
|
||||
((ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, INT_MIN)) == 1))
|
||||
ret = okfn(skb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -747,6 +747,16 @@ struct perf_event {
|
||||
u64 tstamp_running;
|
||||
u64 tstamp_stopped;
|
||||
|
||||
/*
|
||||
* timestamp shadows the actual context timing but it can
|
||||
* be safely used in NMI interrupt context. It reflects the
|
||||
* context time as it was when the event was last scheduled in.
|
||||
*
|
||||
* ctx_time already accounts for ctx->timestamp. Therefore to
|
||||
* compute ctx_time for a sample, simply add perf_clock().
|
||||
*/
|
||||
u64 shadow_ctx_time;
|
||||
|
||||
struct perf_event_attr attr;
|
||||
struct hw_perf_event hw;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ struct platform_pwm_backlight_data {
|
||||
int pwm_id;
|
||||
unsigned int max_brightness;
|
||||
unsigned int dft_brightness;
|
||||
unsigned int lth_brightness;
|
||||
unsigned int pwm_period_ns;
|
||||
int (*init)(struct device *dev);
|
||||
int (*notify)(struct device *dev, int brightness);
|
||||
|
||||
@@ -34,19 +34,13 @@
|
||||
* needed for RCU lookups (because root->height is unreliable). The only
|
||||
* time callers need worry about this is when doing a lookup_slot under
|
||||
* RCU.
|
||||
*
|
||||
* Indirect pointer in fact is also used to tag the last pointer of a node
|
||||
* when it is shrunk, before we rcu free the node. See shrink code for
|
||||
* details.
|
||||
*/
|
||||
#define RADIX_TREE_INDIRECT_PTR 1
|
||||
#define RADIX_TREE_RETRY ((void *)-1UL)
|
||||
|
||||
static inline void *radix_tree_ptr_to_indirect(void *ptr)
|
||||
{
|
||||
return (void *)((unsigned long)ptr | RADIX_TREE_INDIRECT_PTR);
|
||||
}
|
||||
|
||||
static inline void *radix_tree_indirect_to_ptr(void *ptr)
|
||||
{
|
||||
return (void *)((unsigned long)ptr & ~RADIX_TREE_INDIRECT_PTR);
|
||||
}
|
||||
#define radix_tree_indirect_to_ptr(ptr) \
|
||||
radix_tree_indirect_to_ptr((void __force *)(ptr))
|
||||
|
||||
@@ -140,16 +134,29 @@ do { \
|
||||
* removed.
|
||||
*
|
||||
* For use with radix_tree_lookup_slot(). Caller must hold tree at least read
|
||||
* locked across slot lookup and dereference. More likely, will be used with
|
||||
* radix_tree_replace_slot(), as well, so caller will hold tree write locked.
|
||||
* locked across slot lookup and dereference. Not required if write lock is
|
||||
* held (ie. items cannot be concurrently inserted).
|
||||
*
|
||||
* radix_tree_deref_retry must be used to confirm validity of the pointer if
|
||||
* only the read lock is held.
|
||||
*/
|
||||
static inline void *radix_tree_deref_slot(void **pslot)
|
||||
{
|
||||
void *ret = rcu_dereference(*pslot);
|
||||
if (unlikely(radix_tree_is_indirect_ptr(ret)))
|
||||
ret = RADIX_TREE_RETRY;
|
||||
return ret;
|
||||
return rcu_dereference(*pslot);
|
||||
}
|
||||
|
||||
/**
|
||||
* radix_tree_deref_retry - check radix_tree_deref_slot
|
||||
* @arg: pointer returned by radix_tree_deref_slot
|
||||
* Returns: 0 if retry is not required, otherwise retry is required
|
||||
*
|
||||
* radix_tree_deref_retry must be used with radix_tree_deref_slot.
|
||||
*/
|
||||
static inline int radix_tree_deref_retry(void *arg)
|
||||
{
|
||||
return unlikely((unsigned long)arg & RADIX_TREE_INDIRECT_PTR);
|
||||
}
|
||||
|
||||
/**
|
||||
* radix_tree_replace_slot - replace item in a slot
|
||||
* @pslot: pointer to slot, returned by radix_tree_lookup_slot
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define _LINUX_RESOURCE_H
|
||||
|
||||
#include <linux/time.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* Resource control/accounting header file for linux
|
||||
|
||||
@@ -82,13 +82,6 @@ struct svc_xprt {
|
||||
struct net *xpt_net;
|
||||
};
|
||||
|
||||
static inline void register_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u)
|
||||
{
|
||||
spin_lock(&xpt->xpt_lock);
|
||||
list_add(&u->list, &xpt->xpt_users);
|
||||
spin_unlock(&xpt->xpt_lock);
|
||||
}
|
||||
|
||||
static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u)
|
||||
{
|
||||
spin_lock(&xpt->xpt_lock);
|
||||
@@ -96,6 +89,23 @@ static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user
|
||||
spin_unlock(&xpt->xpt_lock);
|
||||
}
|
||||
|
||||
static inline int register_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u)
|
||||
{
|
||||
spin_lock(&xpt->xpt_lock);
|
||||
if (test_bit(XPT_CLOSE, &xpt->xpt_flags)) {
|
||||
/*
|
||||
* The connection is about to be deleted soon (or,
|
||||
* worse, may already be deleted--in which case we've
|
||||
* already notified the xpt_users).
|
||||
*/
|
||||
spin_unlock(&xpt->xpt_lock);
|
||||
return -ENOTCONN;
|
||||
}
|
||||
list_add(&u->list, &xpt->xpt_users);
|
||||
spin_unlock(&xpt->xpt_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int svc_reg_xprt_class(struct svc_xprt_class *);
|
||||
void svc_unreg_xprt_class(struct svc_xprt_class *);
|
||||
void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *,
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#define N_V253 19 /* Codec control over voice modem */
|
||||
#define N_CAIF 20 /* CAIF protocol for talking to modems */
|
||||
#define N_GSM0710 21 /* GSM 0710 Mux */
|
||||
#define N_TI_WL 22 /* for TI's WL BT, FM, GPS combo chips */
|
||||
#define N_TI_WL 22 /* for TI's WL BT, FM, GPS combo chips */
|
||||
|
||||
/*
|
||||
* This character is the same as _POSIX_VDISABLE: it cannot be used as
|
||||
|
||||
@@ -797,7 +797,7 @@ struct usbdrv_wrap {
|
||||
* @disconnect: Called when the interface is no longer accessible, usually
|
||||
* because its device has been (or is being) disconnected or the
|
||||
* driver module is being unloaded.
|
||||
* @ioctl: Used for drivers that want to talk to userspace through
|
||||
* @unlocked_ioctl: Used for drivers that want to talk to userspace through
|
||||
* the "usbfs" filesystem. This lets devices provide ways to
|
||||
* expose information to user space regardless of where they
|
||||
* do (or don't) show up otherwise in the filesystem.
|
||||
|
||||
@@ -89,6 +89,8 @@ struct musb_hdrc_config {
|
||||
/* A GPIO controlling VRSEL in Blackfin */
|
||||
unsigned int gpio_vrsel;
|
||||
unsigned int gpio_vrsel_active;
|
||||
/* musb CLKIN in Blackfin in MHZ */
|
||||
unsigned char clkin;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user