Drop whitespace, Kconfigs, Makefile noise and dead code

Drop whitespace, unused Kconfigs, and bad Makefile entries. Undo
code movement, remove dead function, and delete entire files that
we don't compile that make our code divergent from upstream. No
functional difference.

Change-Id: I1150b3d4b317fb5180c5d26e2366dccb28a6bf43
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
Stephen Boyd 2013-01-14 16:41:42 -08:00
parent 1d29f7f239
commit 4251740f05
58 changed files with 64 additions and 5015 deletions

View File

@ -39,13 +39,6 @@ system: Time spent by tasks of the cgroup in kernel mode.
user and system are in USER_HZ unit.
cpuacct.cpufreq file gives CPU time (in nanoseconds) spent at each CPU
frequency. Platform hooks must be implemented inorder to properly track
time at each CPU frequency.
cpuacct.power file gives CPU power consumed (in milliWatt seconds). Platform
must provide and implement power callback functions.
cpuacct controller uses percpu_counter interface to collect user and
system times. This has two side effects:

View File

@ -1830,13 +1830,6 @@ config HW_PERF_EVENTS
Enable hardware performance counter support for perf events. If
disabled, perf events will use software events only.
config VMALLOC_RESERVE
hex "Reserved vmalloc space"
default 0x08000000
depends on MMU
help
Reserved vmalloc space if not specified on the kernel commandline.
source "mm/Kconfig"
config ARCH_MEMORY_PROBE

View File

@ -110,6 +110,7 @@ void machine_kexec(struct kimage *image)
unsigned long reboot_code_buffer_phys;
void *reboot_code_buffer;
arch_kexec();
page_list = image->head & PAGE_MASK;

View File

@ -2388,12 +2388,6 @@ static void __init mpq8064_pcie_init(void)
}
}
static void __init fsm8064_ep_pcie_init(void)
{
msm_device_pcie.dev.platform_data = &ep_pcie_platform_data;
platform_device_register(&msm_device_pcie);
}
static struct platform_device mpq8064_device_ext_3p3v_vreg = {
.name = "reg-fixed-voltage",
.dev = {
@ -2401,6 +2395,12 @@ static struct platform_device mpq8064_device_ext_3p3v_vreg = {
},
};
static void __init fsm8064_ep_pcie_init(void)
{
msm_device_pcie.dev.platform_data = &ep_pcie_platform_data;
platform_device_register(&msm_device_pcie);
}
static struct platform_device apq8064_device_ext_5v_vreg __devinitdata = {
.name = GPIO_REGULATOR_DEV_NAME,
.id = PM8921_MPP_PM_TO_SYS(7),

View File

@ -425,9 +425,9 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
writel_relaxed(1, l2x0_base + L2X0_CTRL);
}
outer_cache.inv_range = l2x0_inv_range;
outer_cache.clean_range = l2x0_clean_range;
outer_cache.flush_range = l2x0_flush_range;
outer_cache.inv_range = l2x0_inv_range;
outer_cache.clean_range = l2x0_clean_range;
outer_cache.flush_range = l2x0_flush_range;
outer_cache.sync = l2x0_cache_sync;
outer_cache.flush_all = l2x0_flush_all;
outer_cache.inv_all = l2x0_inv_all;

View File

@ -1,6 +1,7 @@
#
# Makefile for the kernel tpm device drivers.
#
obj-$(CONFIG_TCG_TPM) += tpm.o
ifdef CONFIG_ACPI
obj-$(CONFIG_TCG_TPM) += tpm_bios.o

File diff suppressed because it is too large Load Diff

View File

@ -163,15 +163,6 @@ static inline int performance_multiplier(void)
{
int mult = 1;
/* for higher loadavg, we are more reluctant */
/*
* this doesn't work as intended - it is almost always 0, but can
* sometimes, depending on workload, spike very high into the hundreds
* even when the average cpu load is under 10%.
*/
/* mult += 2 * get_loadavg(); */
/* for IO wait tasks (per cpu!) we add 5x each */
mult += 10 * nr_iowait_cpu(smp_processor_id());

View File

@ -411,13 +411,6 @@ config KEYBOARD_OPENCORES
To compile this driver as a module, choose M here; the
module will be called opencores-kbd.
config KEYBOARD_PM8058
bool "Qualcomm PM8058 Matrix Keypad support"
depends on PM8058
help
Say Y here to enable the driver for the keypad matrix interface
on the Qualcomm PM8058 power management I/C device.
config KEYBOARD_PXA27x
tristate "PXA27x/PXA3xx keypad support"
depends on PXA27x || PXA3xx || ARCH_MMP
@ -623,5 +616,3 @@ config KEYBOARD_W90P910
module will be called w90p910_keypad.
endif

View File

@ -54,4 +54,3 @@ obj-$(CONFIG_KEYBOARD_TWL4030) += twl4030_keypad.o
obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o
obj-$(CONFIG_KEYBOARD_QCIKBD) += qci_kbd.o
obj-$(CONFIG_KEYBOARD_W90P910) += w90p910_keypad.o
obj-$(CONFIG_KEYBOARD_PMIC8058) += pmic8058-keypad.o

View File

@ -17,7 +17,6 @@ obj-$(CONFIG_TOUCHSCREEN_ATMEL_MXT) += atmel_mxt_ts.o
obj-$(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) += atmel_tsadcc.o
obj-$(CONFIG_TOUCHSCREEN_AUO_PIXCIR) += auo-pixcir-ts.o
obj-$(CONFIG_TOUCHSCREEN_BITSY) += h3600_ts_input.o
obj-$(CONFIG_TOUCHSCREEN_BU21013) += bu21013_ts.o
obj-$(CONFIG_TOUCHSCREEN_CYPRESS_TMG) += cy8c_tmg_ts.o
obj-$(CONFIG_TOUCHSCREEN_BU21013) += bu21013_ts.o
obj-$(CONFIG_TOUCHSCREEN_CY8CTMG110) += cy8ctmg110_ts.o
@ -29,7 +28,6 @@ obj-$(CONFIG_TOUCHSCREEN_DYNAPRO) += dynapro.o
obj-$(CONFIG_TOUCHSCREEN_HAMPSHIRE) += hampshire.o
obj-$(CONFIG_TOUCHSCREEN_GUNZE) += gunze.o
obj-$(CONFIG_TOUCHSCREEN_EETI) += eeti_ts.o
obj-$(CONFIG_TOUCHSCREEN_ELAN_I2C_8232) += elan8232_i2c.o
obj-$(CONFIG_TOUCHSCREEN_ELO) += elo.o
obj-$(CONFIG_TOUCHSCREEN_EGALAX) += egalax_ts.o
obj-$(CONFIG_TOUCHSCREEN_FUJITSU) += fujitsu_ts.o

View File

@ -195,23 +195,6 @@ config LEDS_MSM_TRICOLOR
To compile this driver as a module, choose M here: the
module will be called leds-msm-tricolor.
config LEDS_GPIO_PLATFORM
bool "Platform device bindings for GPIO LEDs"
depends on LEDS_GPIO
default y
help
Let the leds-gpio driver drive LEDs which have been defined as
platform devices. If you don't know what this means, say yes.
config LEDS_GPIO_OF
bool "OpenFirmware platform device bindings for GPIO LEDs"
depends on LEDS_GPIO && OF_DEVICE
default y
help
Let the leds-gpio driver drive LEDs which have been defined as
of_platform devices. For instance, LEDs which are listed in a "dts"
file.
config LEDS_LP3944
tristate "LED Support for N.S. LP3944 (Fun Light) I2C chip"
depends on LEDS_CLASS

View File

@ -58,11 +58,8 @@ obj-$(CONFIG_TPS65023) += tps65023.o
obj-$(CONFIG_TIMPANI_CODEC) += timpani-codec.o
ifdef CONFIG_TIMPANI_CODEC
obj-$(CONFIG_TIMPANI_CODEC) += msm-adie-codec.o
else ifdef CONFIG_MARIMBA_CODEC
obj-$(CONFIG_MARIMBA_CODEC) += msm-adie-codec.o
endif
obj-$(CONFIG_TWL6030_PWM) += twl6030-pwm.o
obj-$(CONFIG_TWL6040_CORE) += twl6040-core.o twl6040-irq.o
@ -127,6 +124,10 @@ obj-$(CONFIG_MFD_VX855) += vx855.o
obj-$(CONFIG_MFD_WL1273_CORE) += wl1273-core.o
obj-$(CONFIG_MFD_CS5535) += cs5535-mfd.o
obj-$(CONFIG_MFD_OMAP_USB_HOST) += omap-usb-host.o
obj-$(CONFIG_MFD_PM8921_CORE) += pm8921-core.o
obj-$(CONFIG_MFD_PM8821_CORE) += pm8821-core.o
obj-$(CONFIG_MFD_PM8018_CORE) += pm8018-core.o
obj-$(CONFIG_MFD_PM8XXX_IRQ) += pm8xxx-irq.o
obj-$(CONFIG_TPS65911_COMPARATOR) += tps65911-comparator.o
obj-$(CONFIG_MFD_TPS65090) += tps65090.o
obj-$(CONFIG_MFD_AAT2870_CORE) += aat2870-core.o
@ -135,11 +136,7 @@ obj-$(CONFIG_MFD_RC5T583) += rc5t583.o rc5t583-irq.o
obj-$(CONFIG_MFD_S5M_CORE) += s5m-core.o s5m-irq.o
obj-$(CONFIG_PMIC8058) += pmic8058.o
obj-$(CONFIG_PMIC8901) += pmic8901.o
obj-$(CONFIG_MFD_PM8921_CORE) += pm8921-core.o
obj-$(CONFIG_MFD_PM8821_CORE) += pm8821-core.o
obj-$(CONFIG_MFD_PM8018_CORE) += pm8018-core.o
obj-$(CONFIG_MFD_PM8038_CORE) += pm8038-core.o
obj-$(CONFIG_MFD_PM8XXX_IRQ) += pm8xxx-irq.o
obj-$(CONFIG_MFD_PM8821_IRQ) += pm8821-irq.o
obj-$(CONFIG_MFD_PM8XXX_DEBUG) += pm8xxx-debug.o
obj-$(CONFIG_MFD_PM8XXX_PWM) += pm8xxx-pwm.o

View File

@ -54,8 +54,6 @@ obj-$(CONFIG_ALTERA_STAPL) +=altera-stapl/
obj-$(CONFIG_MAX8997_MUIC) += max8997-muic.o
obj-$(CONFIG_WL127X_RFKILL) += wl127x-rfkill.o
obj-$(CONFIG_SENSORS_AK8975) += akm8975.o
obj-$(CONFIG_WL127X_RFKILL) += wl127x-rfkill.o
obj-$(CONFIG_SENSORS_AK8975) += akm8975.o
obj-$(CONFIG_TSIF) += msm_tsif.o
msm_tsif-objs := tsif.o
obj-$(CONFIG_TSIF_CHRDEV) += tsif_chrdev.o

View File

@ -1023,7 +1023,7 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
if (host->areq)
mmc_post_req(host, host->areq->mrq, 0);
/* Cancel a prepared request if it was not started. */
/* Cancel a prepared request if it was not started. */
if ((err || start_err) && areq)
mmc_post_req(host, areq->mrq, -EINVAL);

View File

@ -215,14 +215,14 @@ static void sdio_single_irq_set(struct mmc_card *card)
card->sdio_single_irq = NULL;
if ((card->host->caps & MMC_CAP_SDIO_IRQ) &&
card->host->sdio_irqs == 1)
card->host->sdio_irqs == 1)
for (i = 0; i < card->sdio_funcs; i++) {
func = card->sdio_func[i];
if (func && func->irq_handler) {
card->sdio_single_irq = func;
break;
}
}
func = card->sdio_func[i];
if (func && func->irq_handler) {
card->sdio_single_irq = func;
break;
}
}
}
/**

View File

@ -3219,44 +3219,6 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips,
}
EXPORT_SYMBOL(nand_scan_ident);
static void nand_panic_wait(struct mtd_info *mtd)
{
struct nand_chip *chip = mtd->priv;
int i;
if (chip->state != FL_READY)
for (i = 0; i < 40; i++) {
if (chip->dev_ready(mtd))
break;
mdelay(10);
}
chip->state = FL_READY;
}
static int nand_panic_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf)
{
struct nand_chip *chip = mtd->priv;
int ret;
/* Do not allow reads past end of device */
if ((to + len) > mtd->size)
return -EINVAL;
if (!len)
return 0;
nand_panic_wait(mtd);
chip->ops.len = len;
chip->ops.datbuf = (uint8_t *)buf;
chip->ops.oobbuf = NULL;
ret = nand_do_write_ops(mtd, to, &chip->ops);
*retlen = chip->ops.retlen;
return ret;
}
/**
* nand_scan_tail - [NAND Interface] Scan for the NAND device

View File

@ -1,449 +0,0 @@
/* drivers/net/pppolac.c
*
* Driver for PPP on L2TP Access Concentrator / PPPoLAC Socket (RFC 2661)
*
* Copyright (C) 2009 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*/
/* This driver handles L2TP data packets between a UDP socket and a PPP channel.
* The socket must keep connected, and only one session per socket is permitted.
* Sequencing of outgoing packets is controlled by LNS. Incoming packets with
* sequences are reordered within a sliding window of one second. Currently
* reordering only happens when a packet is received. It is done for simplicity
* since no additional locks or threads are required. This driver only works on
* IPv4 due to the lack of UDP encapsulation support in IPv6. */
#include <linux/module.h>
#include <linux/jiffies.h>
#include <linux/workqueue.h>
#include <linux/skbuff.h>
#include <linux/file.h>
#include <linux/netdevice.h>
#include <linux/net.h>
#include <linux/udp.h>
#include <linux/ppp_defs.h>
#include <linux/if_ppp.h>
#include <linux/if_pppox.h>
#include <linux/ppp_channel.h>
#include <net/tcp_states.h>
#include <asm/uaccess.h>
#define L2TP_CONTROL_BIT 0x80
#define L2TP_LENGTH_BIT 0x40
#define L2TP_SEQUENCE_BIT 0x08
#define L2TP_OFFSET_BIT 0x02
#define L2TP_VERSION 0x02
#define L2TP_VERSION_MASK 0x0F
#define PPP_ADDR 0xFF
#define PPP_CTRL 0x03
union unaligned {
__u32 u32;
} __attribute__((packed));
static inline union unaligned *unaligned(void *ptr)
{
return (union unaligned *)ptr;
}
struct meta {
__u32 sequence;
__u32 timestamp;
};
static inline struct meta *skb_meta(struct sk_buff *skb)
{
return (struct meta *)skb->cb;
}
/******************************************************************************/
static int pppolac_recv_core(struct sock *sk_udp, struct sk_buff *skb)
{
struct sock *sk = (struct sock *)sk_udp->sk_user_data;
struct pppolac_opt *opt = &pppox_sk(sk)->proto.lac;
struct meta *meta = skb_meta(skb);
__u32 now = jiffies;
__u8 bits;
__u8 *ptr;
/* Drop the packet if L2TP header is missing. */
if (skb->len < sizeof(struct udphdr) + 6)
goto drop;
/* Put it back if it is a control packet. */
if (skb->data[sizeof(struct udphdr)] & L2TP_CONTROL_BIT)
return opt->backlog_rcv(sk_udp, skb);
/* Skip UDP header. */
skb_pull(skb, sizeof(struct udphdr));
/* Check the version. */
if ((skb->data[1] & L2TP_VERSION_MASK) != L2TP_VERSION)
goto drop;
bits = skb->data[0];
ptr = &skb->data[2];
/* Check the length if it is present. */
if (bits & L2TP_LENGTH_BIT) {
if ((ptr[0] << 8 | ptr[1]) != skb->len)
goto drop;
ptr += 2;
}
/* Skip all fields including optional ones. */
if (!skb_pull(skb, 6 + (bits & L2TP_SEQUENCE_BIT ? 4 : 0) +
(bits & L2TP_LENGTH_BIT ? 2 : 0) +
(bits & L2TP_OFFSET_BIT ? 2 : 0)))
goto drop;
/* Skip the offset padding if it is present. */
if (bits & L2TP_OFFSET_BIT &&
!skb_pull(skb, skb->data[-2] << 8 | skb->data[-1]))
goto drop;
/* Check the tunnel and the session. */
if (unaligned(ptr)->u32 != opt->local)
goto drop;
/* Check the sequence if it is present. */
if (bits & L2TP_SEQUENCE_BIT) {
meta->sequence = ptr[4] << 8 | ptr[5];
if ((__s16)(meta->sequence - opt->recv_sequence) < 0)
goto drop;
}
/* Skip PPP address and control if they are present. */
if (skb->len >= 2 && skb->data[0] == PPP_ADDR &&
skb->data[1] == PPP_CTRL)
skb_pull(skb, 2);
/* Fix PPP protocol if it is compressed. */
if (skb->len >= 1 && skb->data[0] & 1)
skb_push(skb, 1)[0] = 0;
/* Drop the packet if PPP protocol is missing. */
if (skb->len < 2)
goto drop;
/* Perform reordering if sequencing is enabled. */
atomic_set(&opt->sequencing, bits & L2TP_SEQUENCE_BIT);
if (bits & L2TP_SEQUENCE_BIT) {
struct sk_buff *skb1;
/* Insert the packet into receive queue in order. */
skb_set_owner_r(skb, sk);
skb_queue_walk(&sk->sk_receive_queue, skb1) {
struct meta *meta1 = skb_meta(skb1);
__s16 order = meta->sequence - meta1->sequence;
if (order == 0)
goto drop;
if (order < 0) {
meta->timestamp = meta1->timestamp;
skb_insert(skb1, skb, &sk->sk_receive_queue);
skb = NULL;
break;
}
}
if (skb) {
meta->timestamp = now;
skb_queue_tail(&sk->sk_receive_queue, skb);
}
/* Remove packets from receive queue as long as
* 1. the receive buffer is full,
* 2. they are queued longer than one second, or
* 3. there are no missing packets before them. */
skb_queue_walk_safe(&sk->sk_receive_queue, skb, skb1) {
meta = skb_meta(skb);
if (atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf &&
now - meta->timestamp < HZ &&
meta->sequence != opt->recv_sequence)
break;
skb_unlink(skb, &sk->sk_receive_queue);
opt->recv_sequence = (__u16)(meta->sequence + 1);
skb_orphan(skb);
ppp_input(&pppox_sk(sk)->chan, skb);
}
return NET_RX_SUCCESS;
}
/* Flush receive queue if sequencing is disabled. */
skb_queue_purge(&sk->sk_receive_queue);
skb_orphan(skb);
ppp_input(&pppox_sk(sk)->chan, skb);
return NET_RX_SUCCESS;
drop:
kfree_skb(skb);
return NET_RX_DROP;
}
static int pppolac_recv(struct sock *sk_udp, struct sk_buff *skb)
{
sock_hold(sk_udp);
sk_receive_skb(sk_udp, skb, 0);
return 0;
}
static struct sk_buff_head delivery_queue;
static void pppolac_xmit_core(struct work_struct *delivery_work)
{
mm_segment_t old_fs = get_fs();
struct sk_buff *skb;
set_fs(KERNEL_DS);
while ((skb = skb_dequeue(&delivery_queue))) {
struct sock *sk_udp = skb->sk;
struct kvec iov = {.iov_base = skb->data, .iov_len = skb->len};
struct msghdr msg = {
.msg_iov = (struct iovec *)&iov,
.msg_iovlen = 1,
.msg_flags = MSG_NOSIGNAL | MSG_DONTWAIT,
};
sk_udp->sk_prot->sendmsg(NULL, sk_udp, &msg, skb->len);
kfree_skb(skb);
}
set_fs(old_fs);
}
static DECLARE_WORK(delivery_work, pppolac_xmit_core);
static int pppolac_xmit(struct ppp_channel *chan, struct sk_buff *skb)
{
struct sock *sk_udp = (struct sock *)chan->private;
struct pppolac_opt *opt = &pppox_sk(sk_udp->sk_user_data)->proto.lac;
/* Install PPP address and control. */
skb_push(skb, 2);
skb->data[0] = PPP_ADDR;
skb->data[1] = PPP_CTRL;
/* Install L2TP header. */
if (atomic_read(&opt->sequencing)) {
skb_push(skb, 10);
skb->data[0] = L2TP_SEQUENCE_BIT;
skb->data[6] = opt->xmit_sequence >> 8;
skb->data[7] = opt->xmit_sequence;
skb->data[8] = 0;
skb->data[9] = 0;
opt->xmit_sequence++;
} else {
skb_push(skb, 6);
skb->data[0] = 0;
}
skb->data[1] = L2TP_VERSION;
unaligned(&skb->data[2])->u32 = opt->remote;
/* Now send the packet via the delivery queue. */
skb_set_owner_w(skb, sk_udp);
skb_queue_tail(&delivery_queue, skb);
schedule_work(&delivery_work);
return 1;
}
/******************************************************************************/
static struct ppp_channel_ops pppolac_channel_ops = {
.start_xmit = pppolac_xmit,
};
static int pppolac_connect(struct socket *sock, struct sockaddr *useraddr,
int addrlen, int flags)
{
struct sock *sk = sock->sk;
struct pppox_sock *po = pppox_sk(sk);
struct sockaddr_pppolac *addr = (struct sockaddr_pppolac *)useraddr;
struct socket *sock_udp = NULL;
struct sock *sk_udp;
int error;
if (addrlen != sizeof(struct sockaddr_pppolac) ||
!addr->local.tunnel || !addr->local.session ||
!addr->remote.tunnel || !addr->remote.session) {
return -EINVAL;
}
lock_sock(sk);
error = -EALREADY;
if (sk->sk_state != PPPOX_NONE)
goto out;
sock_udp = sockfd_lookup(addr->udp_socket, &error);
if (!sock_udp)
goto out;
sk_udp = sock_udp->sk;
lock_sock(sk_udp);
/* Remove this check when IPv6 supports UDP encapsulation. */
error = -EAFNOSUPPORT;
if (sk_udp->sk_family != AF_INET)
goto out;
error = -EPROTONOSUPPORT;
if (sk_udp->sk_protocol != IPPROTO_UDP)
goto out;
error = -EDESTADDRREQ;
if (sk_udp->sk_state != TCP_ESTABLISHED)
goto out;
error = -EBUSY;
if (udp_sk(sk_udp)->encap_type || sk_udp->sk_user_data)
goto out;
if (!sk_udp->sk_bound_dev_if) {
struct dst_entry *dst = sk_dst_get(sk_udp);
error = -ENODEV;
if (!dst)
goto out;
sk_udp->sk_bound_dev_if = dst->dev->ifindex;
dst_release(dst);
}
po->chan.hdrlen = 12;
po->chan.private = sk_udp;
po->chan.ops = &pppolac_channel_ops;
po->chan.mtu = PPP_MRU - 80;
po->proto.lac.local = unaligned(&addr->local)->u32;
po->proto.lac.remote = unaligned(&addr->remote)->u32;
atomic_set(&po->proto.lac.sequencing, 1);
po->proto.lac.backlog_rcv = sk_udp->sk_backlog_rcv;
error = ppp_register_channel(&po->chan);
if (error)
goto out;
sk->sk_state = PPPOX_CONNECTED;
udp_sk(sk_udp)->encap_type = UDP_ENCAP_L2TPINUDP;
udp_sk(sk_udp)->encap_rcv = pppolac_recv;
sk_udp->sk_backlog_rcv = pppolac_recv_core;
sk_udp->sk_user_data = sk;
out:
if (sock_udp) {
release_sock(sk_udp);
if (error)
sockfd_put(sock_udp);
}
release_sock(sk);
return error;
}
static int pppolac_release(struct socket *sock)
{
struct sock *sk = sock->sk;
if (!sk)
return 0;
lock_sock(sk);
if (sock_flag(sk, SOCK_DEAD)) {
release_sock(sk);
return -EBADF;
}
if (sk->sk_state != PPPOX_NONE) {
struct sock *sk_udp = (struct sock *)pppox_sk(sk)->chan.private;
lock_sock(sk_udp);
skb_queue_purge(&sk->sk_receive_queue);
pppox_unbind_sock(sk);
udp_sk(sk_udp)->encap_type = 0;
udp_sk(sk_udp)->encap_rcv = NULL;
sk_udp->sk_backlog_rcv = pppox_sk(sk)->proto.lac.backlog_rcv;
sk_udp->sk_user_data = NULL;
release_sock(sk_udp);
sockfd_put(sk_udp->sk_socket);
}
sock_orphan(sk);
sock->sk = NULL;
release_sock(sk);
sock_put(sk);
return 0;
}
/******************************************************************************/
static struct proto pppolac_proto = {
.name = "PPPOLAC",
.owner = THIS_MODULE,
.obj_size = sizeof(struct pppox_sock),
};
static struct proto_ops pppolac_proto_ops = {
.family = PF_PPPOX,
.owner = THIS_MODULE,
.release = pppolac_release,
.bind = sock_no_bind,
.connect = pppolac_connect,
.socketpair = sock_no_socketpair,
.accept = sock_no_accept,
.getname = sock_no_getname,
.poll = sock_no_poll,
.ioctl = pppox_ioctl,
.listen = sock_no_listen,
.shutdown = sock_no_shutdown,
.setsockopt = sock_no_setsockopt,
.getsockopt = sock_no_getsockopt,
.sendmsg = sock_no_sendmsg,
.recvmsg = sock_no_recvmsg,
.mmap = sock_no_mmap,
};
static int pppolac_create(struct net *net, struct socket *sock)
{
struct sock *sk;
sk = sk_alloc(net, PF_PPPOX, GFP_KERNEL, &pppolac_proto);
if (!sk)
return -ENOMEM;
sock_init_data(sock, sk);
sock->state = SS_UNCONNECTED;
sock->ops = &pppolac_proto_ops;
sk->sk_protocol = PX_PROTO_OLAC;
sk->sk_state = PPPOX_NONE;
return 0;
}
/******************************************************************************/
static struct pppox_proto pppolac_pppox_proto = {
.create = pppolac_create,
.owner = THIS_MODULE,
};
static int __init pppolac_init(void)
{
int error;
error = proto_register(&pppolac_proto, 0);
if (error)
return error;
error = register_pppox_proto(PX_PROTO_OLAC, &pppolac_pppox_proto);
if (error)
proto_unregister(&pppolac_proto);
else
skb_queue_head_init(&delivery_queue);
return error;
}
static void __exit pppolac_exit(void)
{
unregister_pppox_proto(PX_PROTO_OLAC);
proto_unregister(&pppolac_proto);
}
module_init(pppolac_init);
module_exit(pppolac_exit);
MODULE_DESCRIPTION("PPP on L2TP Access Concentrator (PPPoLAC)");
MODULE_AUTHOR("Chia-chi Yeh <chiachi@android.com>");
MODULE_LICENSE("GPL");

View File

@ -1,428 +0,0 @@
/* drivers/net/pppopns.c
*
* Driver for PPP on PPTP Network Server / PPPoPNS Socket (RFC 2637)
*
* Copyright (C) 2009 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*/
/* This driver handles PPTP data packets between a RAW socket and a PPP channel.
* The socket is created in the kernel space and connected to the same address
* of the control socket. Outgoing packets are always sent with sequences but
* without acknowledgements. Incoming packets with sequences are reordered
* within a sliding window of one second. Currently reordering only happens when
* a packet is received. It is done for simplicity since no additional locks or
* threads are required. This driver should work on both IPv4 and IPv6. */
#include <linux/module.h>
#include <linux/jiffies.h>
#include <linux/workqueue.h>
#include <linux/skbuff.h>
#include <linux/file.h>
#include <linux/netdevice.h>
#include <linux/net.h>
#include <linux/ppp_defs.h>
#include <linux/if.h>
#include <linux/if_ppp.h>
#include <linux/if_pppox.h>
#include <linux/ppp_channel.h>
#include <asm/uaccess.h>
#define GRE_HEADER_SIZE 8
#define PPTP_GRE_BITS htons(0x2001)
#define PPTP_GRE_BITS_MASK htons(0xEF7F)
#define PPTP_GRE_SEQ_BIT htons(0x1000)
#define PPTP_GRE_ACK_BIT htons(0x0080)
#define PPTP_GRE_TYPE htons(0x880B)
#define PPP_ADDR 0xFF
#define PPP_CTRL 0x03
struct header {
__u16 bits;
__u16 type;
__u16 length;
__u16 call;
__u32 sequence;
} __attribute__((packed));
struct meta {
__u32 sequence;
__u32 timestamp;
};
static inline struct meta *skb_meta(struct sk_buff *skb)
{
return (struct meta *)skb->cb;
}
/******************************************************************************/
static int pppopns_recv_core(struct sock *sk_raw, struct sk_buff *skb)
{
struct sock *sk = (struct sock *)sk_raw->sk_user_data;
struct pppopns_opt *opt = &pppox_sk(sk)->proto.pns;
struct meta *meta = skb_meta(skb);
__u32 now = jiffies;
struct header *hdr;
/* Skip transport header */
skb_pull(skb, skb_transport_header(skb) - skb->data);
/* Drop the packet if GRE header is missing. */
if (skb->len < GRE_HEADER_SIZE)
goto drop;
hdr = (struct header *)skb->data;
/* Check the header. */
if (hdr->type != PPTP_GRE_TYPE || hdr->call != opt->local ||
(hdr->bits & PPTP_GRE_BITS_MASK) != PPTP_GRE_BITS)
goto drop;
/* Skip all fields including optional ones. */
if (!skb_pull(skb, GRE_HEADER_SIZE +
(hdr->bits & PPTP_GRE_SEQ_BIT ? 4 : 0) +
(hdr->bits & PPTP_GRE_ACK_BIT ? 4 : 0)))
goto drop;
/* Check the length. */
if (skb->len != ntohs(hdr->length))
goto drop;
/* Check the sequence if it is present. */
if (hdr->bits & PPTP_GRE_SEQ_BIT) {
meta->sequence = ntohl(hdr->sequence);
if ((__s32)(meta->sequence - opt->recv_sequence) < 0)
goto drop;
}
/* Skip PPP address and control if they are present. */
if (skb->len >= 2 && skb->data[0] == PPP_ADDR &&
skb->data[1] == PPP_CTRL)
skb_pull(skb, 2);
/* Fix PPP protocol if it is compressed. */
if (skb->len >= 1 && skb->data[0] & 1)
skb_push(skb, 1)[0] = 0;
/* Drop the packet if PPP protocol is missing. */
if (skb->len < 2)
goto drop;
/* Perform reordering if sequencing is enabled. */
if (hdr->bits & PPTP_GRE_SEQ_BIT) {
struct sk_buff *skb1;
/* Insert the packet into receive queue in order. */
skb_set_owner_r(skb, sk);
skb_queue_walk(&sk->sk_receive_queue, skb1) {
struct meta *meta1 = skb_meta(skb1);
__s32 order = meta->sequence - meta1->sequence;
if (order == 0)
goto drop;
if (order < 0) {
meta->timestamp = meta1->timestamp;
skb_insert(skb1, skb, &sk->sk_receive_queue);
skb = NULL;
break;
}
}
if (skb) {
meta->timestamp = now;
skb_queue_tail(&sk->sk_receive_queue, skb);
}
/* Remove packets from receive queue as long as
* 1. the receive buffer is full,
* 2. they are queued longer than one second, or
* 3. there are no missing packets before them. */
skb_queue_walk_safe(&sk->sk_receive_queue, skb, skb1) {
meta = skb_meta(skb);
if (atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf &&
now - meta->timestamp < HZ &&
meta->sequence != opt->recv_sequence)
break;
skb_unlink(skb, &sk->sk_receive_queue);
opt->recv_sequence = meta->sequence + 1;
skb_orphan(skb);
ppp_input(&pppox_sk(sk)->chan, skb);
}
return NET_RX_SUCCESS;
}
/* Flush receive queue if sequencing is disabled. */
skb_queue_purge(&sk->sk_receive_queue);
skb_orphan(skb);
ppp_input(&pppox_sk(sk)->chan, skb);
return NET_RX_SUCCESS;
drop:
kfree_skb(skb);
return NET_RX_DROP;
}
static void pppopns_recv(struct sock *sk_raw, int length)
{
struct sk_buff *skb;
while ((skb = skb_dequeue(&sk_raw->sk_receive_queue))) {
sock_hold(sk_raw);
sk_receive_skb(sk_raw, skb, 0);
}
}
static struct sk_buff_head delivery_queue;
static void pppopns_xmit_core(struct work_struct *delivery_work)
{
mm_segment_t old_fs = get_fs();
struct sk_buff *skb;
set_fs(KERNEL_DS);
while ((skb = skb_dequeue(&delivery_queue))) {
struct sock *sk_raw = skb->sk;
struct kvec iov = {.iov_base = skb->data, .iov_len = skb->len};
struct msghdr msg = {
.msg_iov = (struct iovec *)&iov,
.msg_iovlen = 1,
.msg_flags = MSG_NOSIGNAL | MSG_DONTWAIT,
};
sk_raw->sk_prot->sendmsg(NULL, sk_raw, &msg, skb->len);
kfree_skb(skb);
}
set_fs(old_fs);
}
static DECLARE_WORK(delivery_work, pppopns_xmit_core);
static int pppopns_xmit(struct ppp_channel *chan, struct sk_buff *skb)
{
struct sock *sk_raw = (struct sock *)chan->private;
struct pppopns_opt *opt = &pppox_sk(sk_raw->sk_user_data)->proto.pns;
struct header *hdr;
__u16 length;
/* Install PPP address and control. */
skb_push(skb, 2);
skb->data[0] = PPP_ADDR;
skb->data[1] = PPP_CTRL;
length = skb->len;
/* Install PPTP GRE header. */
hdr = (struct header *)skb_push(skb, 12);
hdr->bits = PPTP_GRE_BITS | PPTP_GRE_SEQ_BIT;
hdr->type = PPTP_GRE_TYPE;
hdr->length = htons(length);
hdr->call = opt->remote;
hdr->sequence = htonl(opt->xmit_sequence);
opt->xmit_sequence++;
/* Now send the packet via the delivery queue. */
skb_set_owner_w(skb, sk_raw);
skb_queue_tail(&delivery_queue, skb);
schedule_work(&delivery_work);
return 1;
}
/******************************************************************************/
static struct ppp_channel_ops pppopns_channel_ops = {
.start_xmit = pppopns_xmit,
};
static int pppopns_connect(struct socket *sock, struct sockaddr *useraddr,
int addrlen, int flags)
{
struct sock *sk = sock->sk;
struct pppox_sock *po = pppox_sk(sk);
struct sockaddr_pppopns *addr = (struct sockaddr_pppopns *)useraddr;
struct sockaddr_storage ss;
struct socket *sock_tcp = NULL;
struct socket *sock_raw = NULL;
struct sock *sk_tcp;
struct sock *sk_raw;
int error;
if (addrlen != sizeof(struct sockaddr_pppopns))
return -EINVAL;
lock_sock(sk);
error = -EALREADY;
if (sk->sk_state != PPPOX_NONE)
goto out;
sock_tcp = sockfd_lookup(addr->tcp_socket, &error);
if (!sock_tcp)
goto out;
sk_tcp = sock_tcp->sk;
error = -EPROTONOSUPPORT;
if (sk_tcp->sk_protocol != IPPROTO_TCP)
goto out;
addrlen = sizeof(struct sockaddr_storage);
error = kernel_getpeername(sock_tcp, (struct sockaddr *)&ss, &addrlen);
if (error)
goto out;
if (!sk_tcp->sk_bound_dev_if) {
struct dst_entry *dst = sk_dst_get(sk_tcp);
error = -ENODEV;
if (!dst)
goto out;
sk_tcp->sk_bound_dev_if = dst->dev->ifindex;
dst_release(dst);
}
error = sock_create(ss.ss_family, SOCK_RAW, IPPROTO_GRE, &sock_raw);
if (error)
goto out;
sk_raw = sock_raw->sk;
sk_raw->sk_bound_dev_if = sk_tcp->sk_bound_dev_if;
error = kernel_connect(sock_raw, (struct sockaddr *)&ss, addrlen, 0);
if (error)
goto out;
po->chan.hdrlen = 14;
po->chan.private = sk_raw;
po->chan.ops = &pppopns_channel_ops;
po->chan.mtu = PPP_MRU - 80;
po->proto.pns.local = addr->local;
po->proto.pns.remote = addr->remote;
po->proto.pns.data_ready = sk_raw->sk_data_ready;
po->proto.pns.backlog_rcv = sk_raw->sk_backlog_rcv;
error = ppp_register_channel(&po->chan);
if (error)
goto out;
sk->sk_state = PPPOX_CONNECTED;
lock_sock(sk_raw);
sk_raw->sk_data_ready = pppopns_recv;
sk_raw->sk_backlog_rcv = pppopns_recv_core;
sk_raw->sk_user_data = sk;
release_sock(sk_raw);
out:
if (sock_tcp)
sockfd_put(sock_tcp);
if (error && sock_raw)
sock_release(sock_raw);
release_sock(sk);
return error;
}
static int pppopns_release(struct socket *sock)
{
struct sock *sk = sock->sk;
if (!sk)
return 0;
lock_sock(sk);
if (sock_flag(sk, SOCK_DEAD)) {
release_sock(sk);
return -EBADF;
}
if (sk->sk_state != PPPOX_NONE) {
struct sock *sk_raw = (struct sock *)pppox_sk(sk)->chan.private;
lock_sock(sk_raw);
skb_queue_purge(&sk->sk_receive_queue);
pppox_unbind_sock(sk);
sk_raw->sk_data_ready = pppox_sk(sk)->proto.pns.data_ready;
sk_raw->sk_backlog_rcv = pppox_sk(sk)->proto.pns.backlog_rcv;
sk_raw->sk_user_data = NULL;
release_sock(sk_raw);
sock_release(sk_raw->sk_socket);
}
sock_orphan(sk);
sock->sk = NULL;
release_sock(sk);
sock_put(sk);
return 0;
}
/******************************************************************************/
static struct proto pppopns_proto = {
.name = "PPPOPNS",
.owner = THIS_MODULE,
.obj_size = sizeof(struct pppox_sock),
};
static struct proto_ops pppopns_proto_ops = {
.family = PF_PPPOX,
.owner = THIS_MODULE,
.release = pppopns_release,
.bind = sock_no_bind,
.connect = pppopns_connect,
.socketpair = sock_no_socketpair,
.accept = sock_no_accept,
.getname = sock_no_getname,
.poll = sock_no_poll,
.ioctl = pppox_ioctl,
.listen = sock_no_listen,
.shutdown = sock_no_shutdown,
.setsockopt = sock_no_setsockopt,
.getsockopt = sock_no_getsockopt,
.sendmsg = sock_no_sendmsg,
.recvmsg = sock_no_recvmsg,
.mmap = sock_no_mmap,
};
static int pppopns_create(struct net *net, struct socket *sock)
{
struct sock *sk;
sk = sk_alloc(net, PF_PPPOX, GFP_KERNEL, &pppopns_proto);
if (!sk)
return -ENOMEM;
sock_init_data(sock, sk);
sock->state = SS_UNCONNECTED;
sock->ops = &pppopns_proto_ops;
sk->sk_protocol = PX_PROTO_OPNS;
sk->sk_state = PPPOX_NONE;
return 0;
}
/******************************************************************************/
static struct pppox_proto pppopns_pppox_proto = {
.create = pppopns_create,
.owner = THIS_MODULE,
};
static int __init pppopns_init(void)
{
int error;
error = proto_register(&pppopns_proto, 0);
if (error)
return error;
error = register_pppox_proto(PX_PROTO_OPNS, &pppopns_pppox_proto);
if (error)
proto_unregister(&pppopns_proto);
else
skb_queue_head_init(&delivery_queue);
return error;
}
static void __exit pppopns_exit(void)
{
unregister_pppox_proto(PX_PROTO_OPNS);
proto_unregister(&pppopns_proto);
}
module_init(pppopns_init);
module_exit(pppopns_exit);
MODULE_DESCRIPTION("PPP on PPTP Network Server (PPPoPNS)");
MODULE_AUTHOR("Chia-chi Yeh <chiachi@android.com>");
MODULE_LICENSE("GPL");

View File

@ -294,6 +294,13 @@ config BATTERY_MSM
help
Say Y to enable support for the battery in Qualcomm MSM.
config BATTERY_MSM_FAKE
tristate "Fake MSM battery"
depends on ARCH_MSM && BATTERY_MSM
default n
help
Say Y to bypass actual battery queries.
config BATTERY_MSM8X60
tristate "MSM8X60 battery"
select PMIC8XXX_BATTALARM
@ -365,13 +372,6 @@ config SMB350_CHARGER
The driver reports the charger status via the power supply framework.
A charger status change triggers an IRQ via the device STAT pin.
config BATTERY_MSM_FAKE
tristate "Fake MSM battery"
depends on ARCH_MSM && BATTERY_MSM
default n
help
Say Y to bypass actual battery queries.
config PM8058_FIX_USB
tristate "pmic8058 software workaround for usb removal"
depends on PMIC8058
@ -396,13 +396,6 @@ config BATTERY_BQ27520
help
Say Y here to enable support for batteries with BQ27520 (I2C) chips.
config BATTERY_BQ27541
tristate "BQ27541 battery driver"
depends on I2C
default n
help
Say Y here to enable support for batteries with BQ27541 (I2C) chips.
config BQ27520_TEST_ENABLE
bool "Enable BQ27520 Fuel Gauge Chip Test"
depends on BATTERY_BQ27520
@ -410,6 +403,13 @@ config BQ27520_TEST_ENABLE
help
Say Y here to enable Test sysfs Interface for BQ27520 Drivers.
config BATTERY_BQ27541
tristate "BQ27541 battery driver"
depends on I2C
default n
help
Say Y here to enable support for batteries with BQ27541 (I2C) chips.
config BATTERY_BQ28400
tristate "BQ28400 battery driver"
depends on I2C

View File

@ -436,4 +436,6 @@ config REGULATOR_QPNP
comply with QPNP. QPNP is a SPMI based PMIC implementation. These
chips provide several different varieties of LDO and switching
regulators. They also provide voltage switches and boost regulators.
endif

View File

@ -45,7 +45,6 @@ obj-$(CONFIG_REGULATOR_TPS65217) += tps65217-regulator.o
obj-$(CONFIG_REGULATOR_TPS6524X) += tps6524x-regulator.o
obj-$(CONFIG_REGULATOR_TPS6586X) += tps6586x-regulator.o
obj-$(CONFIG_REGULATOR_TPS65910) += tps65910-regulator.o
obj-$(CONFIG_REGULATOR_AAT2870) += aat2870-regulator.o
obj-$(CONFIG_REGULATOR_PMIC8058) += pmic8058-regulator.o
obj-$(CONFIG_REGULATOR_PMIC8901) += pmic8901-regulator.o
obj-$(CONFIG_REGULATOR_MSM_GPIO) += msm-gpio-regulator.o

View File

@ -123,24 +123,6 @@ config RTC_INTF_DEV_UIE_EMUL
clock several times per second, please enable this option
only if you know that you really need it.
config RTC_INTF_ALARM
bool "Android alarm driver"
depends on RTC_CLASS
default y
help
Provides non-wakeup and rtc backed wakeup alarms based on rtc or
elapsed realtime, and a non-wakeup alarm on the monotonic clock.
Also provides an interface to set the wall time which must be used
for elapsed realtime to work.
config RTC_INTF_ALARM_DEV
bool "Android alarm device"
depends on RTC_INTF_ALARM
default y
help
Exports the alarm interface to user-space.
config RTC_DRV_TEST
tristate "Test driver/device"
help
@ -804,13 +786,6 @@ config RTC_DRV_DAVINCI
This driver can also be built as a module. If so, the module
will be called rtc-davinci.
config RTC_DRV_MSM7X00A
tristate "MSM7X00A"
depends on ARCH_MSM
default y
help
RTC driver for Qualcomm MSM7K chipsets
config RTC_DRV_OMAP
tristate "TI OMAP1"
depends on ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP730 || ARCH_DAVINCI_DA8XX
@ -1150,15 +1125,6 @@ config RTC_DRV_PUV3
This drive can also be built as a module. If so, the module
will be called rtc-puv3.
config RTC_DRV_PM8XXX
tristate "Qualcomm PMIC8XXX RTC"
depends on MFD_PM8XXX
help
Say Y here if you want to support the Qualcomm PMIC8XXX RTC.
To compile this driver as a module, choose M here: the
module will be called rtc-pm8xxx.
config RTC_DRV_LOONGSON1
tristate "loongson1 RTC support"
depends on MACH_LOONGSON1

View File

@ -81,7 +81,6 @@ obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o
obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o
obj-$(CONFIG_RTC_DRV_PCF2123) += rtc-pcf2123.o
obj-$(CONFIG_RTC_DRV_PCF50633) += rtc-pcf50633.o
obj-$(CONFIG_RTC_DRV_PM8XXX) += rtc-pm8xxx.o
obj-$(CONFIG_RTC_DRV_PL030) += rtc-pl030.o
obj-$(CONFIG_RTC_DRV_PL031) += rtc-pl031.o
obj-$(CONFIG_RTC_DRV_PM8XXX) += rtc-pm8xxx.o

View File

@ -1,13 +0,0 @@
config DREAM
tristate "HTC Dream support"
depends on MACH_TROUT
if DREAM
source "drivers/staging/dream/camera/Kconfig"
config INPUT_GPIO
tristate "GPIO driver support"
help
Say Y here if you want to support gpio based keys, wheels etc...
endif

View File

@ -1,5 +0,0 @@
EXTRA_CFLAGS=-Idrivers/staging/dream/include
obj-$(CONFIG_MSM_ADSP) += qdsp5/
obj-$(CONFIG_MSM_CAMERA) += camera/
obj-$(CONFIG_INPUT_GPIO) += gpio_axis.o gpio_event.o gpio_input.o gpio_matrix.o gpio_output.o

View File

@ -988,14 +988,6 @@ config SERIAL_MSM_HS
Choose M here to compile it as a module. The module will be
called msm_serial_hs.
config SERIAL_MSM_CLOCK_CONTROL
bool "Allow tty clients to make clock requests to msm uarts."
depends on SERIAL_MSM=y
default y
help
Provides an interface for tty clients to request the msm uart clock
to be turned on or off for power savings.
config SERIAL_MSM_RX_WAKEUP
bool "Wakeup the msm uart clock on GPIO activity."
depends on SERIAL_MSM_CLOCK_CONTROL

View File

@ -134,6 +134,8 @@ source "drivers/usb/host/Kconfig"
source "drivers/usb/musb/Kconfig"
source "drivers/usb/renesas_usbhs/Kconfig"
source "drivers/usb/class/Kconfig"
source "drivers/usb/storage/Kconfig"

View File

@ -2093,6 +2093,7 @@ static ssize_t enable_store(struct device *pdev, struct device_attribute *attr,
bool audio_enabled = false;
static DEFINE_RATELIMIT_STATE(rl, 10*HZ, 1);
if (!cdev)
return -ENODEV;

View File

@ -3,12 +3,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only 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.
*
*/
#include <linux/module.h>

View File

@ -3280,6 +3280,7 @@ static int ci13xxx_pullup(struct usb_gadget *_gadget, int is_active)
static int ci13xxx_start(struct usb_gadget_driver *driver,
int (*bind)(struct usb_gadget *));
static int ci13xxx_stop(struct usb_gadget_driver *driver);
/**
* Device operations part of the API to the USB controller hardware,
* which don't involve endpoints (or i/o)

View File

@ -137,10 +137,10 @@ struct ci13xxx_udc_driver {
#define CI13XXX_CONTROLLER_RESET_EVENT 0
#define CI13XXX_CONTROLLER_CONNECT_EVENT 1
#define CI13XXX_CONTROLLER_SUSPEND_EVENT 2
#define CI13XXX_CONTROLLER_REMOTE_WAKEUP_EVENT 3
#define CI13XXX_CONTROLLER_RESUME_EVENT 4
#define CI13XXX_CONTROLLER_DISCONNECT_EVENT 5
#define CI13XXX_CONTROLLER_UDC_STARTED_EVENT 6
#define CI13XXX_CONTROLLER_REMOTE_WAKEUP_EVENT 3
#define CI13XXX_CONTROLLER_RESUME_EVENT 4
#define CI13XXX_CONTROLLER_DISCONNECT_EVENT 5
#define CI13XXX_CONTROLLER_UDC_STARTED_EVENT 6
void (*notify_event) (struct ci13xxx *udc, unsigned event);
};

View File

@ -1,304 +0,0 @@
/*
* Qualcomm Maemo Composite driver
*
* Copyright (C) 2008 David Brownell
* Copyright (C) 2008 Nokia Corporation
* Copyright (C) 2009 Samsung Electronics
* Copyright (c) 2010, The Linux Foundation. All rights reserved.
*
* This program from The Linux Foundation is free software; you can
* redistribute it and/or modify it under the GNU General Public License
* version 2 and only version 2 as published by the Free Software Foundation.
* The original work available from [git.kernel.org ] is subject to the
* notice below.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/kernel.h>
#include <linux/utsname.h>
#include <linux/kdev_t.h>
#include <linux/delay.h>
#define DRIVER_DESC "Qcom Maemo Composite Gadget"
#define VENDOR_ID 0x05c6
#define PRODUCT_ID 0x902E
/*
* kbuild is not very cooperative with respect to linking separately
* compiled library objects into one module. So for now we won't use
* separate compilation ... ensuring init/exit sections work to shrink
* the runtime footprint, and giving us at least some parts of what
* a "gcc --combine ... part1.c part2.c part3.c ... " build would.
*/
#include "composite.c"
#include "usbstring.c"
#include "config.c"
#include "epautoconf.c"
#define USB_ETH
#define USB_ETH_RNDIS
#ifdef USB_ETH_RNDIS
# include "f_rndis.c"
# include "rndis.c"
#endif
#include "u_serial.c"
#include "f_serial.c"
#include "u_ether.c"
#undef DBG /* u_ether.c has broken idea about macros */
#undef VDBG /* so clean up after it */
#undef ERROR
#undef INFO
#include "f_mass_storage.c"
#include "f_diag.c"
#include "f_rmnet.c"
/*-------------------------------------------------------------------------*/
/* string IDs are assigned dynamically */
#define STRING_MANUFACTURER_IDX 0
#define STRING_PRODUCT_IDX 1
#define STRING_SERIAL_IDX 2
/* String Table */
static struct usb_string strings_dev[] = {
/* These dummy values should be overridden by platform data */
[STRING_MANUFACTURER_IDX].s = "Qualcomm Incorporated",
[STRING_PRODUCT_IDX].s = "Usb composition",
[STRING_SERIAL_IDX].s = "0123456789ABCDEF",
{ } /* end of list */
};
static struct usb_gadget_strings stringtab_dev = {
.language = 0x0409, /* en-us */
.strings = strings_dev,
};
static struct usb_gadget_strings *dev_strings[] = {
&stringtab_dev,
NULL,
};
static struct usb_device_descriptor device_desc = {
.bLength = sizeof(device_desc),
.bDescriptorType = USB_DT_DEVICE,
.bcdUSB = __constant_cpu_to_le16(0x0200),
.bDeviceClass = USB_CLASS_PER_INTERFACE,
.bDeviceSubClass = 0,
.bDeviceProtocol = 0,
.idVendor = __constant_cpu_to_le16(VENDOR_ID),
.idProduct = __constant_cpu_to_le16(PRODUCT_ID),
.bcdDevice = __constant_cpu_to_le16(0xffff),
.bNumConfigurations = 1,
};
static u8 hostaddr[ETH_ALEN];
static struct usb_diag_ch *diag_ch;
static struct usb_diag_platform_data usb_diag_pdata = {
.ch_name = DIAG_LEGACY,
};
/****************************** Configurations ******************************/
static struct fsg_module_parameters mod_data = {
.stall = 0
};
FSG_MODULE_PARAMETERS(/* no prefix */, mod_data);
static struct fsg_common *fsg_common;
static int maemo_setup_config(struct usb_configuration *c,
const struct usb_ctrlrequest *ctrl);
static int maemo_do_config(struct usb_configuration *c)
{
int ret;
ret = rndis_bind_config(c, hostaddr);
if (ret < 0)
return ret;
ret = diag_function_add(c);
if (ret < 0)
return ret;
ret = gser_bind_config(c, 0);
if (ret < 0)
return ret;
ret = gser_bind_config(c, 1);
if (ret < 0)
return ret;
ret = rmnet_function_add(c);
if (ret < 0)
return ret;
ret = fsg_add(c->cdev, c, fsg_common);
if (ret < 0)
return ret;
return 0;
}
static struct usb_configuration maemo_config_driver = {
.label = "Qcom Maemo Gadget",
.bind = maemo_do_config,
.setup = maemo_setup_config,
.bConfigurationValue = 1,
.bMaxPower = 0xFA,
};
static int maemo_setup_config(struct usb_configuration *c,
const struct usb_ctrlrequest *ctrl)
{
int i;
int ret = -EOPNOTSUPP;
for (i = 0; i < maemo_config_driver.next_interface_id; i++) {
if (maemo_config_driver.interface[i]->setup) {
ret = maemo_config_driver.interface[i]->setup(
maemo_config_driver.interface[i], ctrl);
if (ret >= 0)
return ret;
}
}
return ret;
}
static int maemo_bind(struct usb_composite_dev *cdev)
{
struct usb_gadget *gadget = cdev->gadget;
int status, gcnum;
/* set up diag channel */
diag_ch = diag_setup(&usb_diag_pdata);
if (IS_ERR(diag_ch))
return PTR_ERR(diag_ch);
/* set up network link layer */
status = gether_setup(cdev->gadget, hostaddr);
if (status < 0)
goto diag_clean;
/* set up serial link layer */
status = gserial_setup(cdev->gadget, 2);
if (status < 0)
goto fail0;
/* set up mass storage function */
fsg_common = fsg_common_from_params(0, cdev, &mod_data);
if (IS_ERR(fsg_common)) {
status = PTR_ERR(fsg_common);
goto fail1;
}
gcnum = usb_gadget_controller_number(gadget);
if (gcnum >= 0)
device_desc.bcdDevice = cpu_to_le16(0x0300 | gcnum);
else {
/* gadget zero is so simple (for now, no altsettings) that
* it SHOULD NOT have problems with bulk-capable hardware.
* so just warn about unrcognized controllers -- don't panic.
*
* things like configuration and altsetting numbering
* can need hardware-specific attention though.
*/
WARNING(cdev, "controller '%s' not recognized\n",
gadget->name);
device_desc.bcdDevice = __constant_cpu_to_le16(0x9999);
}
/* Allocate string descriptor numbers ... note that string
* contents can be overridden by the composite_dev glue.
*/
status = usb_string_id(cdev);
if (status < 0)
goto fail2;
strings_dev[STRING_MANUFACTURER_IDX].id = status;
device_desc.iManufacturer = status;
status = usb_string_id(cdev);
if (status < 0)
goto fail2;
strings_dev[STRING_PRODUCT_IDX].id = status;
device_desc.iProduct = status;
if (!usb_gadget_set_selfpowered(gadget))
maemo_config_driver.bmAttributes |= USB_CONFIG_ATT_SELFPOWER;
if (gadget->ops->wakeup)
maemo_config_driver.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
/* register our first configuration */
status = usb_add_config(cdev, &maemo_config_driver);
if (status < 0)
goto fail2;
usb_gadget_set_selfpowered(gadget);
dev_info(&gadget->dev, DRIVER_DESC "\n");
fsg_common_put(fsg_common);
return 0;
fail2:
fsg_common_put(fsg_common);
fail1:
gserial_cleanup();
fail0:
gether_cleanup();
diag_clean:
diag_cleanup(diag_ch);
return status;
}
static int __exit maemo_unbind(struct usb_composite_dev *cdev)
{
gserial_cleanup();
gether_cleanup();
diag_cleanup(diag_ch);
return 0;
}
static struct usb_composite_driver qcom_maemo_driver = {
.name = "Qcom Maemo Gadget",
.dev = &device_desc,
.strings = dev_strings,
.bind = maemo_bind,
.unbind = __exit_p(maemo_unbind),
};
static int __init qcom_maemo_usb_init(void)
{
return usb_composite_register(&qcom_maemo_driver);
}
module_init(qcom_maemo_usb_init);
static void __exit qcom_maemo_usb_cleanup(void)
{
usb_composite_unregister(&qcom_maemo_driver);
}
module_exit(qcom_maemo_usb_cleanup);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL v2");
MODULE_VERSION("1.0");

View File

@ -754,23 +754,6 @@ static inline u32 hc32_to_cpup (const struct ehci_hcd *ehci, const __hc32 *x)
#endif
/*
* Writing to dma coherent memory on ARM may be delayed via L2
* writing buffer, so introduce the helper which can flush L2 writing
* buffer into memory immediately, especially used to flush ehci
* descriptor to memory.
* */
#ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
static inline void ehci_sync_mem(void)
{
mb();
}
#else
static inline void ehci_sync_mem(void)
{
}
#endif
/*-------------------------------------------------------------------------*/
#ifdef CONFIG_PCI

View File

@ -1,205 +0,0 @@
/*
* Copyright (C) 2011 Google, Inc.
*
* Author:
* Colin Cross <ccross@android.com>
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
#include <linux/kernel.h>
#include <linux/mutex.h>
#include <linux/notifier.h>
#include <linux/usb/otg_id.h>
static DEFINE_MUTEX(otg_id_lock);
static struct plist_head otg_id_plist =
PLIST_HEAD_INIT(otg_id_plist);
static struct otg_id_notifier_block *otg_id_active;
static bool otg_id_cancelling;
static bool otg_id_inited;
static int otg_id_suspended;
static bool otg_id_pending;
static void otg_id_cancel(void)
{
if (otg_id_active) {
otg_id_cancelling = true;
mutex_unlock(&otg_id_lock);
otg_id_active->cancel(otg_id_active);
mutex_lock(&otg_id_lock);
otg_id_cancelling = false;
}
}
static void __otg_id_notify(void)
{
int ret = 0;
struct otg_id_notifier_block *otg_id_nb;
bool proxy_wait = false;
if (plist_head_empty(&otg_id_plist))
return;
plist_for_each_entry(otg_id_nb, &otg_id_plist, p) {
if (proxy_wait) {
if (otg_id_nb->proxy_wait)
ret = otg_id_nb->proxy_wait(otg_id_nb);
} else {
ret = otg_id_nb->detect(otg_id_nb);
}
if (ret == OTG_ID_HANDLED) {
otg_id_active = otg_id_nb;
return;
}
if (ret == OTG_ID_PROXY_WAIT)
proxy_wait = true;
}
WARN(1, "otg id event not handled");
otg_id_active = NULL;
}
int otg_id_init(void)
{
mutex_lock(&otg_id_lock);
otg_id_inited = true;
__otg_id_notify();
mutex_unlock(&otg_id_lock);
return 0;
}
late_initcall(otg_id_init);
/**
* otg_id_register_notifier
* @otg_id_nb: notifier block containing priority and callback function
*
* Register a notifier that will be called on any USB cable state change.
* The priority determines the order the callback will be called in, a higher
* number will be called first. A callback function needs to determine the
* type of USB cable that is connected. If it can determine the type, it
* should notify the appropriate drivers (for example, call an otg notifier
* with USB_EVENT_VBUS), and return OTG_ID_HANDLED. Once a callback has
* returned OTG_ID_HANDLED, it is responsible for calling otg_id_notify() when
* the detected USB cable is disconnected.
*/
int otg_id_register_notifier(struct otg_id_notifier_block *otg_id_nb)
{
plist_node_init(&otg_id_nb->p, otg_id_nb->priority);
mutex_lock(&otg_id_lock);
plist_add(&otg_id_nb->p, &otg_id_plist);
if (otg_id_inited) {
otg_id_cancel();
__otg_id_notify();
}
mutex_unlock(&otg_id_lock);
return 0;
}
void otg_id_unregister_notifier(struct otg_id_notifier_block *otg_id_nb)
{
mutex_lock(&otg_id_lock);
plist_del(&otg_id_nb->p, &otg_id_plist);
if (otg_id_inited && (otg_id_active == otg_id_nb)) {
otg_id_cancel();
__otg_id_notify();
}
mutex_unlock(&otg_id_lock);
}
/**
* otg_id_notify
*
* Notify listeners on any USB cable state change.
*
* A driver may only call otg_id_notify if it returned OTG_ID_HANDLED the last
* time it's notifier was called, and it's cancel function has not been called.
*/
void otg_id_notify(void)
{
mutex_lock(&otg_id_lock);
if (otg_id_cancelling)
goto out;
if (otg_id_suspended != 0) {
otg_id_pending = true;
goto out;
}
__otg_id_notify();
out:
mutex_unlock(&otg_id_lock);
}
/**
* otg_id_suspend
*
* Mark the otg_id subsystem as going into suspend. From here on out,
* any notifications will be deferred until the last otg_id client resumes.
* If there is a pending notification when calling this function, it will
* return a negative errno and expects that the caller will abort suspend.
* Returs 0 on success.
*/
int otg_id_suspend(void)
{
int ret = 0;
mutex_lock(&otg_id_lock);
/*
* if there's a pending notification, tell the caller to abort suspend
*/
if (otg_id_suspended != 0 && otg_id_pending) {
pr_info("otg_id: pending notification, should abort suspend\n");
ret = -EBUSY;
goto out;
}
otg_id_suspended++;
out:
mutex_unlock(&otg_id_lock);
return ret;
}
/**
* otg_id_resume
*
* Inform the otg_id subsystem that a client is resuming. If this is the
* last client to be resumed and there's a pending notification,
* otg_id_notify() is called.
*/
void otg_id_resume(void)
{
mutex_lock(&otg_id_lock);
if (WARN(!otg_id_suspended, "unbalanced otg_id_resume\n"))
goto out;
if (--otg_id_suspended == 0) {
if (otg_id_pending) {
pr_info("otg_id: had pending notification\n");
otg_id_pending = false;
__otg_id_notify();
}
}
out:
mutex_unlock(&otg_id_lock);
}

View File

@ -2,7 +2,6 @@
# Makefile for the Linux fat filesystem support.
#
obj-$(CONFIG_FAT_FS) += fat.o
obj-$(CONFIG_VFAT_FS) += vfat.o
obj-$(CONFIG_MSDOS_FS) += msdos.o

View File

@ -1,43 +0,0 @@
/* include/linux/cpuacct.h
*
* Copyright (C) 2010 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
#ifndef _CPUACCT_H_
#define _CPUACCT_H_
#include <linux/cgroup.h>
#ifdef CONFIG_CGROUP_CPUACCT
/*
* Platform specific CPU frequency hooks for cpuacct. These functions are
* called from the scheduler.
*/
struct cpuacct_charge_calls {
/*
* Platforms can take advantage of this data and use
* per-cpu allocations if necessary.
*/
void (*init) (void **cpuacct_data);
void (*charge) (void *cpuacct_data, u64 cputime, unsigned int cpu);
void (*cpufreq_show) (void *cpuacct_data, struct cgroup_map_cb *cb);
/* Returns power consumed in milliWatt seconds */
u64 (*power_usage) (void *cpuacct_data);
};
int cpuacct_charge_register(struct cpuacct_charge_calls *fn);
#endif /* CONFIG_CGROUP_CPUACCT */
#endif // _CPUACCT_H_

View File

@ -17,8 +17,8 @@
* nr_file rlimit, so it's safe to set up a ridiculously high absolute
* upper limit on files-per-process.
*
* Some programs (notably those using select()) may have to be
* recompiled to take full advantage of the new limits..
* Some programs (notably those using select()) may have to be
* recompiled to take full advantage of the new limits..
*/
/* Fixed constants first: */
@ -178,7 +178,7 @@ struct inodes_stat_t {
#define SEL_EX 4
/* public flags for file_system_type */
#define FS_REQUIRES_DEV 1
#define FS_REQUIRES_DEV 1
#define FS_BINARY_MOUNTDATA 2
#define FS_HAS_SUBTYPE 4
#define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */
@ -490,7 +490,7 @@ struct iattr {
*/
#include <linux/quota.h>
/**
/**
* enum positive_aop_returns - aop return codes with specific semantics
*
* @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has
@ -500,7 +500,7 @@ struct iattr {
* be a candidate for writeback again in the near
* future. Other callers must be careful to unlock
* the page if they get this return. Returned by
* writepage();
* writepage();
*
* @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has
* unlocked it and the page might have been truncated.
@ -1078,10 +1078,10 @@ static inline int file_check_writeable(struct file *filp)
#define MAX_NON_LFS ((1UL<<31) - 1)
/* Page cache limit. The filesystems should put that into their s_maxbytes
limits, otherwise bad things can happen in VM. */
/* Page cache limit. The filesystems should put that into their s_maxbytes
limits, otherwise bad things can happen in VM. */
#if BITS_PER_LONG==32
#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
#elif BITS_PER_LONG==64
#define MAX_LFS_FILESIZE 0x7fffffffffffffffUL
#endif
@ -2282,7 +2282,7 @@ extern void free_write_pipe(struct file *);
extern int kernel_read(struct file *, loff_t, char *, unsigned long);
extern struct file * open_exec(const char *);
/* fs/dcache.c -- generic fs support functions */
extern int is_subdir(struct dentry *, struct dentry *);
extern int path_is_under(struct path *, struct path *);

View File

@ -710,7 +710,4 @@ extern char *mach_panic_string;
#endif /* __KERNEL__ */
/* To identify board information in panic logs, set this */
extern char *mach_panic_string;
#endif

View File

@ -243,10 +243,6 @@ extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms)
extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map,
unsigned long pnum);
extern void reserve_hotplug_pages(unsigned long start_pfn,
unsigned long nr_pages);
extern void unreserve_hotplug_pages(unsigned long start_pfn,
unsigned long nr_pages);
#endif /* __LINUX_MEMORY_HOTPLUG_H */
extern int physical_remove_memory(u64 start, u64 size);
extern int arch_physical_remove_memory(u64 start, u64 size);

View File

@ -529,12 +529,6 @@ static inline int zone_is_oom_locked(const struct zone *zone)
return test_bit(ZONE_OOM_LOCKED, &zone->flags);
}
#ifdef CONFIG_SMP
unsigned long zone_nr_free_pages(struct zone *zone);
#else
#define zone_nr_free_pages(zone) zone_page_state(zone, NR_FREE_PAGES)
#endif /* CONFIG_SMP */
/*
* The "priority" of VM scanning is how much of the queues we will scan in one
* go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the

View File

@ -1135,55 +1135,6 @@ enum nl80211_commands {
* %NL80211_CMD_SET_BEACON to provide extra IEs (e.g., WPS/P2P IE) into
* (Re)Association Response frames when the driver (or firmware) replies to
* (Re)Association Request frames.
* @NL80211_ATTR_STA_WME: Nested attribute containing the wme configuration
* of the station, see &enum nl80211_sta_wme_attr.
* @NL80211_ATTR_SUPPORT_AP_UAPSD: the device supports uapsd when working
* as AP.
*
* @NL80211_ATTR_ROAM_SUPPORT: Indicates whether the firmware is capable of
* roaming to another AP in the same ESS if the signal lever is low.
*
* @NL80211_ATTR_PMKSA_CANDIDATE: Nested attribute containing the PMKSA caching
* candidate information, see &enum nl80211_pmksa_candidate_attr.
*
* @NL80211_ATTR_TX_NO_CCK_RATE: Indicates whether to use CCK rate or not
* for management frames transmission. In order to avoid p2p probe/action
* frames are being transmitted at CCK rate in 2GHz band, the user space
* applications use this attribute.
* This attribute is used with %NL80211_CMD_TRIGGER_SCAN and
* %NL80211_CMD_FRAME commands.
*
* @NL80211_ATTR_TDLS_ACTION: Low level TDLS action code (e.g. link setup
* request, link setup confirm, link teardown, etc.). Values are
* described in the TDLS (802.11z) specification.
* @NL80211_ATTR_TDLS_DIALOG_TOKEN: Non-zero token for uniquely identifying a
* TDLS conversation between two devices.
* @NL80211_ATTR_TDLS_OPERATION: High level TDLS operation; see
* &enum nl80211_tdls_operation, represented as a u8.
* @NL80211_ATTR_TDLS_SUPPORT: A flag indicating the device can operate
* as a TDLS peer sta.
* @NL80211_ATTR_TDLS_EXTERNAL_SETUP: The TDLS discovery/setup and teardown
* procedures should be performed by sending TDLS packets via
* %NL80211_CMD_TDLS_MGMT. Otherwise %NL80211_CMD_TDLS_OPER should be
* used for asking the driver to perform a TDLS operation.
*
* @NL80211_ATTR_DEVICE_AP_SME: This u32 attribute may be listed for devices
* that have AP support to indicate that they have the AP SME integrated
* with support for the features listed in this attribute, see
* &enum nl80211_ap_sme_features.
*
* @NL80211_ATTR_DONT_WAIT_FOR_ACK: Used with %NL80211_CMD_FRAME, this tells
* the driver to not wait for an acknowledgement. Note that due to this,
* it will also not give a status callback nor return a cookie. This is
* mostly useful for probe responses to save airtime.
*
* @NL80211_ATTR_FEATURE_FLAGS: This u32 attribute contains flags from
* &enum nl80211_feature_flags and is advertised in wiphy information.
* @NL80211_ATTR_PROBE_RESP_OFFLOAD: Indicates that the HW responds to probe
*
* requests while operating in AP-mode.
* This attribute holds a bitmap of the supported protocols for
* offloading (see &enum nl80211_probe_resp_offload_support_attr).
*
* @NL80211_ATTR_STA_WME: Nested attribute containing the wme configuration
* of the station, see &enum nl80211_sta_wme_attr.

View File

@ -1,22 +0,0 @@
/*
* Copyright (C) 2010 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
#ifndef _INCLUDE_LINUX_PLATFORM_DATA_RAM_CONSOLE_H_
#define _INCLUDE_LINUX_PLATFORM_DATA_RAM_CONSOLE_H_
struct ram_console_platform_data {
const char *bootinfo;
};
#endif /* _INCLUDE_LINUX_PLATFORM_DATA_RAM_CONSOLE_H_ */

View File

@ -27,8 +27,6 @@ struct cpu_stop_work {
struct cpu_stop_done *done;
};
extern struct mutex stop_cpus_mutex;
int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg);
void stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fn, void *arg,
struct cpu_stop_work *work_buf);

View File

@ -1,58 +0,0 @@
/*
* Copyright (C) 2011 Google, Inc.
*
* Author:
* Colin Cross <ccross@android.com>
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
#ifndef __LINUX_USB_OTG_ID_H
#define __LINUX_USB_OTG_ID_H
#include <linux/notifier.h>
#include <linux/plist.h>
/**
* otg_id_notifier_block
*
* @priority: Order the notifications will be called in. Higher numbers
* get called first.
* @detect: Called during otg_id_notify. Return OTG_ID_HANDLED if the USB cable
* has been identified
* @proxy_wait: Called during otg_id_notify if a previous handler returns
* OTG_ID_PROXY_WAIT. This should wait on ID change then call otg_id_notify.
* This is used when a handler knows what's connected but can't detect
* the change itself.
* @cancel: Called after detect has returned OTG_ID_HANDLED to ask it to
* release detection resources to allow a new identification to occur.
*/
struct otg_id_notifier_block {
int priority;
int (*detect)(struct otg_id_notifier_block *otg_id_nb);
int (*proxy_wait)(struct otg_id_notifier_block *otg_id_nb);
void (*cancel)(struct otg_id_notifier_block *otg_id_nb);
struct plist_node p;
};
#define OTG_ID_PROXY_WAIT 2
#define OTG_ID_HANDLED 1
#define OTG_ID_UNHANDLED 0
int otg_id_register_notifier(struct otg_id_notifier_block *otg_id_nb);
void otg_id_unregister_notifier(struct otg_id_notifier_block *otg_id_nb);
void otg_id_notify(void);
int otg_id_suspend(void);
void otg_id_resume(void);
#endif /* __LINUX_USB_OTG_ID_H */

View File

@ -1491,6 +1491,7 @@ enum v4l2_mpeg_video_header_mode {
V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE = 0,
V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME = 1,
V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_I_FRAME = 2,
};
#define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (V4L2_CID_MPEG_BASE+217)
#define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (V4L2_CID_MPEG_BASE+218)
@ -1602,7 +1603,6 @@ enum v4l2_mpeg_video_h264_vui_sar_idc {
#define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (V4L2_CID_MPEG_BASE+403)
#define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (V4L2_CID_MPEG_BASE+404)
#define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL (V4L2_CID_MPEG_BASE+405)
enum v4l2_mpeg_video_mpeg4_level {
V4L2_MPEG_VIDEO_MPEG4_LEVEL_0 = 0,
V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B = 1,

View File

@ -152,8 +152,8 @@ void rc_map_init(void);
#define RC_MAP_TREKSTOR "rc-trekstor"
#define RC_MAP_TT_1500 "rc-tt-1500"
#define RC_MAP_TWINHAN_VP1027_DVBS "rc-twinhan1027"
#define RC_MAP_VIDEOMATE_K100 "rc-videomate-k100"
#define RC_MAP_UE_RF4CE "rc-ue-rf4ce"
#define RC_MAP_VIDEOMATE_K100 "rc-videomate-k100"
#define RC_MAP_VIDEOMATE_S350 "rc-videomate-s350"
#define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr"
#define RC_MAP_WINFAST "rc-winfast"

View File

@ -669,7 +669,9 @@ struct station_info {
const u8 *assoc_req_ies;
size_t assoc_req_ies_len;
u32 beacon_loss_count;
/*
* Note: Add a new enum station_info_flags value for each new field and
* use it to check which fields are initialized.

View File

@ -14,8 +14,6 @@ extern struct proto tcpv6_prot;
struct flowi6;
extern void initialize_hashidentrnd(void);
/* extension headers */
extern int ipv6_exthdrs_init(void);
extern void ipv6_exthdrs_exit(void);

View File

@ -1132,15 +1132,6 @@ config SHMEM
option replaces shmem and tmpfs with the much simpler ramfs code,
which may be appropriate on small systems without swap.
config ASHMEM
bool "Enable the Anonymous Shared Memory Subsystem"
default n
depends on SHMEM || TINY_SHMEM
help
The ashmem subsystem is a new shared memory allocator, similar to
POSIX SHM but with different behavior and sporting a simpler
file-based API.
config AIO
bool "Enable AIO support" if EXPERT
default y

View File

@ -666,7 +666,6 @@ static int __init pm_init(void)
tc_ev_timer.function = &tc_ev_stop;
tc_ev_processed = 1;
power_kobj = kobject_create_and_add("power", NULL);
if (!power_kobj)
return -ENOMEM;

View File

@ -133,8 +133,8 @@ void stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fn, void *arg,
cpu_stop_queue_work(&per_cpu(cpu_stopper, cpu), work_buf);
}
DEFINE_MUTEX(stop_cpus_mutex);
/* static data for stop_cpus */
static DEFINE_MUTEX(stop_cpus_mutex);
static DEFINE_PER_CPU(struct cpu_stop_work, stop_cpus_work);
static void queue_stop_cpus_work(const struct cpumask *cpumask,

View File

@ -201,7 +201,7 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int al
l2cap_pi(sk)->mode, sk->sk_state);
if (!addr || alen < sizeof(addr->sa_family) ||
addr->sa_family != AF_BLUETOOTH)
addr->sa_family != AF_BLUETOOTH)
return -EINVAL;
memset(&la, 0, sizeof(la));

View File

@ -69,3 +69,4 @@ obj-$(CONFIG_IP_NF_ARP_MANGLE) += arpt_mangle.o
obj-$(CONFIG_IP_NF_ARPFILTER) += arptable_filter.o
obj-$(CONFIG_IP_NF_QUEUE) += ip_queue.o

View File

@ -1991,49 +1991,6 @@ void tcp_v4_destroy_sock(struct sock *sk)
}
EXPORT_SYMBOL(tcp_v4_destroy_sock);
/*
* tcp_v4_nuke_addr - destroy all sockets on the given local address
*/
void tcp_v4_nuke_addr(__u32 saddr)
{
unsigned int bucket;
for (bucket = 0; bucket < tcp_hashinfo.ehash_mask; bucket++) {
struct hlist_nulls_node *node;
struct sock *sk;
spinlock_t *lock = inet_ehash_lockp(&tcp_hashinfo, bucket);
restart:
spin_lock_bh(lock);
sk_nulls_for_each(sk, node, &tcp_hashinfo.ehash[bucket].chain) {
struct inet_sock *inet = inet_sk(sk);
if (inet->inet_rcv_saddr != saddr)
continue;
if (sysctl_ip_dynaddr && sk->sk_state == TCP_SYN_SENT)
continue;
if (sock_flag(sk, SOCK_DEAD))
continue;
sock_hold(sk);
spin_unlock_bh(lock);
local_bh_disable();
bh_lock_sock(sk);
sk->sk_err = ETIMEDOUT;
sk->sk_error_report(sk);
tcp_done(sk);
bh_unlock_sock(sk);
local_bh_enable();
sock_put(sk);
goto restart;
}
spin_unlock_bh(lock);
}
}
#ifdef CONFIG_PROC_FS
/* Proc filesystem TCP sock list dumping. */

View File

@ -1038,6 +1038,7 @@ int ieee80211_get_ratemask(struct ieee80211_supported_band *sband,
if (!found)
return -EINVAL;
}
/*
* mask must have at least one bit set here since we
* didn't accept a 0-length rates array nor allowed