diff --git a/[refs] b/[refs] index 8c3f5ab3272d..828a8cd60d98 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1d63e726408dfdb3e10ed8f00c383b30ebb333d3 +refs/heads/master: ecab1f4479abb88d739bc1aac5545e8399fbad66 diff --git a/trunk/arch/mips/math-emu/cp1emu.c b/trunk/arch/mips/math-emu/cp1emu.c index b08fc65c13a6..7ec0b217dfd3 100644 --- a/trunk/arch/mips/math-emu/cp1emu.c +++ b/trunk/arch/mips/math-emu/cp1emu.c @@ -1299,12 +1299,12 @@ static int __init debugfs_fpuemu(void) if (!mips_debugfs_dir) return -ENODEV; dir = debugfs_create_dir("fpuemustats", mips_debugfs_dir); - if (IS_ERR(dir)) - return PTR_ERR(dir); + if (!dir) + return -ENOMEM; for (i = 0; i < ARRAY_SIZE(vars); i++) { d = debugfs_create_u32(vars[i].name, S_IRUGO, dir, vars[i].v); - if (IS_ERR(d)) - return PTR_ERR(d); + if (!d) + return -ENOMEM; } return 0; } diff --git a/trunk/drivers/bluetooth/btsdio.c b/trunk/drivers/bluetooth/btsdio.c index cda6c7cc944b..58630cc1eff2 100644 --- a/trunk/drivers/bluetooth/btsdio.c +++ b/trunk/drivers/bluetooth/btsdio.c @@ -152,7 +152,7 @@ static int btsdio_rx_packet(struct btsdio_data *data) err = sdio_readsb(data->func, skb->data, REG_RDAT, len - 4); if (err < 0) { - kfree_skb(skb); + kfree(skb); return err; } diff --git a/trunk/drivers/char/hw_random/amd-rng.c b/trunk/drivers/char/hw_random/amd-rng.c index cd0ba51f7c80..c422e870dc52 100644 --- a/trunk/drivers/char/hw_random/amd-rng.c +++ b/trunk/drivers/char/hw_random/amd-rng.c @@ -11,7 +11,7 @@ * derived from * * Hardware driver for the AMD 768 Random Number Generator (RNG) - * (c) Copyright 2001 Red Hat Inc + * (c) Copyright 2001 Red Hat Inc * * derived from * diff --git a/trunk/drivers/char/hw_random/geode-rng.c b/trunk/drivers/char/hw_random/geode-rng.c index 64d513f68368..fed4ef5569f5 100644 --- a/trunk/drivers/char/hw_random/geode-rng.c +++ b/trunk/drivers/char/hw_random/geode-rng.c @@ -11,7 +11,7 @@ * derived from * * Hardware driver for the AMD 768 Random Number Generator (RNG) - * (c) Copyright 2001 Red Hat Inc + * (c) Copyright 2001 Red Hat Inc * * derived from * diff --git a/trunk/drivers/char/hw_random/intel-rng.c b/trunk/drivers/char/hw_random/intel-rng.c index 5dcbe603eca2..8a2fce0756ec 100644 --- a/trunk/drivers/char/hw_random/intel-rng.c +++ b/trunk/drivers/char/hw_random/intel-rng.c @@ -11,7 +11,7 @@ * derived from * * Hardware driver for the AMD 768 Random Number Generator (RNG) - * (c) Copyright 2001 Red Hat Inc + * (c) Copyright 2001 Red Hat Inc * * derived from * diff --git a/trunk/drivers/char/hw_random/via-rng.c b/trunk/drivers/char/hw_random/via-rng.c index 4e9573c1d39e..128202e18fc9 100644 --- a/trunk/drivers/char/hw_random/via-rng.c +++ b/trunk/drivers/char/hw_random/via-rng.c @@ -11,7 +11,7 @@ * derived from * * Hardware driver for the AMD 768 Random Number Generator (RNG) - * (c) Copyright 2001 Red Hat Inc + * (c) Copyright 2001 Red Hat Inc * * derived from * diff --git a/trunk/drivers/firewire/fw-ohci.c b/trunk/drivers/firewire/fw-ohci.c index 8e16bfbdcb3d..251416f2148f 100644 --- a/trunk/drivers/firewire/fw-ohci.c +++ b/trunk/drivers/firewire/fw-ohci.c @@ -476,7 +476,6 @@ static int ar_context_add_page(struct ar_context *ctx) if (ab == NULL) return -ENOMEM; - ab->next = NULL; memset(&ab->descriptor, 0, sizeof(ab->descriptor)); ab->descriptor.control = cpu_to_le16(DESCRIPTOR_INPUT_MORE | DESCRIPTOR_STATUS | @@ -497,21 +496,6 @@ static int ar_context_add_page(struct ar_context *ctx) return 0; } -static void ar_context_release(struct ar_context *ctx) -{ - struct ar_buffer *ab, *ab_next; - size_t offset; - dma_addr_t ab_bus; - - for (ab = ctx->current_buffer; ab; ab = ab_next) { - ab_next = ab->next; - offset = offsetof(struct ar_buffer, data); - ab_bus = le32_to_cpu(ab->descriptor.data_address) - offset; - dma_free_coherent(ctx->ohci->card.device, PAGE_SIZE, - ab, ab_bus); - } -} - #if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32) #define cond_le32_to_cpu(v) \ (ohci->old_uninorth ? (__force __u32)(v) : le32_to_cpu(v)) @@ -2365,8 +2349,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) ohci = kzalloc(sizeof(*ohci), GFP_KERNEL); if (ohci == NULL) { - err = -ENOMEM; - goto fail; + fw_error("Could not malloc fw_ohci data.\n"); + return -ENOMEM; } fw_card_initialize(&ohci->card, &ohci_driver, &dev->dev); @@ -2375,7 +2359,7 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) err = pci_enable_device(dev); if (err) { - fw_error("Failed to enable OHCI hardware\n"); + fw_error("Failed to enable OHCI hardware.\n"); goto fail_free; } @@ -2443,8 +2427,9 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) ohci->ir_context_list = kzalloc(size, GFP_KERNEL); if (ohci->it_context_list == NULL || ohci->ir_context_list == NULL) { + fw_error("Out of memory for it/ir contexts.\n"); err = -ENOMEM; - goto fail_contexts; + goto fail_registers; } /* self-id dma buffer allocation */ @@ -2453,8 +2438,9 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) &ohci->self_id_bus, GFP_KERNEL); if (ohci->self_id_cpu == NULL) { + fw_error("Out of memory for self ID buffer.\n"); err = -ENOMEM; - goto fail_contexts; + goto fail_registers; } bus_options = reg_read(ohci, OHCI1394_BusOptions); @@ -2474,13 +2460,9 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) fail_self_id: dma_free_coherent(ohci->card.device, SELF_ID_BUF_SIZE, ohci->self_id_cpu, ohci->self_id_bus); - fail_contexts: - kfree(ohci->ir_context_list); + fail_registers: kfree(ohci->it_context_list); - context_release(&ohci->at_response_ctx); - context_release(&ohci->at_request_ctx); - ar_context_release(&ohci->ar_response_ctx); - ar_context_release(&ohci->ar_request_ctx); + kfree(ohci->ir_context_list); pci_iounmap(dev, ohci->registers); fail_iomem: pci_release_region(dev, 0); @@ -2489,9 +2471,6 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) fail_free: kfree(&ohci->card); ohci_pmac_off(dev); - fail: - if (err == -ENOMEM) - fw_error("Out of memory\n"); return err; } @@ -2512,19 +2491,8 @@ static void pci_remove(struct pci_dev *dev) software_reset(ohci); free_irq(dev->irq, ohci); - - if (ohci->next_config_rom && ohci->next_config_rom != ohci->config_rom) - dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, - ohci->next_config_rom, ohci->next_config_rom_bus); - if (ohci->config_rom) - dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, - ohci->config_rom, ohci->config_rom_bus); dma_free_coherent(ohci->card.device, SELF_ID_BUF_SIZE, ohci->self_id_cpu, ohci->self_id_bus); - ar_context_release(&ohci->ar_request_ctx); - ar_context_release(&ohci->ar_response_ctx); - context_release(&ohci->at_request_ctx); - context_release(&ohci->at_response_ctx); kfree(ohci->it_context_list); kfree(ohci->ir_context_list); pci_iounmap(dev, ohci->registers); diff --git a/trunk/drivers/firewire/fw-sbp2.c b/trunk/drivers/firewire/fw-sbp2.c index d334cac5e1fc..ef0b9b419c27 100644 --- a/trunk/drivers/firewire/fw-sbp2.c +++ b/trunk/drivers/firewire/fw-sbp2.c @@ -173,9 +173,6 @@ struct sbp2_target { int blocked; /* ditto */ }; -/* Impossible login_id, to detect logout attempt before successful login */ -#define INVALID_LOGIN_ID 0x10000 - /* * Per section 7.4.8 of the SBP-2 spec, a mgt_ORB_timeout value can be * provided in the config rom. Most devices do provide a value, which @@ -791,20 +788,9 @@ static void sbp2_release_target(struct kref *kref) scsi_remove_device(sdev); scsi_device_put(sdev); } - if (lu->login_id != INVALID_LOGIN_ID) { - int generation, node_id; - /* - * tgt->node_id may be obsolete here if we failed - * during initial login or after a bus reset where - * the topology changed. - */ - generation = device->generation; - smp_rmb(); /* node_id vs. generation */ - node_id = device->node_id; - sbp2_send_management_orb(lu, node_id, generation, - SBP2_LOGOUT_REQUEST, - lu->login_id, NULL); - } + sbp2_send_management_orb(lu, tgt->node_id, lu->generation, + SBP2_LOGOUT_REQUEST, lu->login_id, NULL); + fw_core_remove_address_handler(&lu->address_handler); list_del(&lu->link); kfree(lu); @@ -819,20 +805,19 @@ static void sbp2_release_target(struct kref *kref) static struct workqueue_struct *sbp2_wq; -static void sbp2_target_put(struct sbp2_target *tgt) -{ - kref_put(&tgt->kref, sbp2_release_target); -} - /* * Always get the target's kref when scheduling work on one its units. * Each workqueue job is responsible to call sbp2_target_put() upon return. */ static void sbp2_queue_work(struct sbp2_logical_unit *lu, unsigned long delay) { - kref_get(&lu->tgt->kref); - if (!queue_delayed_work(sbp2_wq, &lu->work, delay)) - sbp2_target_put(lu->tgt); + if (queue_delayed_work(sbp2_wq, &lu->work, delay)) + kref_get(&lu->tgt->kref); +} + +static void sbp2_target_put(struct sbp2_target *tgt) +{ + kref_put(&tgt->kref, sbp2_release_target); } /* @@ -993,7 +978,6 @@ static int sbp2_add_logical_unit(struct sbp2_target *tgt, int lun_entry) lu->tgt = tgt; lu->lun = lun_entry & 0xffff; - lu->login_id = INVALID_LOGIN_ID; lu->retries = 0; lu->has_sdev = false; lu->blocked = false; @@ -1163,7 +1147,7 @@ static int sbp2_probe(struct device *dev) /* Do the login in a workqueue so we can easily reschedule retries. */ list_for_each_entry(lu, &tgt->lu_list, link) - sbp2_queue_work(lu, DIV_ROUND_UP(HZ, 5)); + sbp2_queue_work(lu, 0); return 0; fail_tgt_put: diff --git a/trunk/drivers/firewire/fw-topology.c b/trunk/drivers/firewire/fw-topology.c index 5e204713002d..c1b81077c4a8 100644 --- a/trunk/drivers/firewire/fw-topology.c +++ b/trunk/drivers/firewire/fw-topology.c @@ -413,7 +413,7 @@ static void update_tree(struct fw_card *card, struct fw_node *root) { struct list_head list0, list1; - struct fw_node *node0, *node1, *next1; + struct fw_node *node0, *node1; int i, event; INIT_LIST_HEAD(&list0); @@ -485,9 +485,7 @@ update_tree(struct fw_card *card, struct fw_node *root) } node0 = fw_node(node0->link.next); - next1 = fw_node(node1->link.next); - fw_node_put(node1); - node1 = next1; + node1 = fw_node(node1->link.next); } } diff --git a/trunk/drivers/firewire/fw-transaction.h b/trunk/drivers/firewire/fw-transaction.h index aed7dbb17cda..027f58ce81ad 100644 --- a/trunk/drivers/firewire/fw-transaction.h +++ b/trunk/drivers/firewire/fw-transaction.h @@ -248,7 +248,7 @@ struct fw_card { struct fw_node *local_node; struct fw_node *root_node; struct fw_node *irm_node; - u8 color; /* must be u8 to match the definition in struct fw_node */ + int color; int gap_count; bool beta_repeaters_present; diff --git a/trunk/drivers/leds/leds-da903x.c b/trunk/drivers/leds/leds-da903x.c index 2768c69257f6..f1fddb18d70d 100644 --- a/trunk/drivers/leds/leds-da903x.c +++ b/trunk/drivers/leds/leds-da903x.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #define DA9030_LED1_CONTROL 0x20 diff --git a/trunk/drivers/net/wireless/libertas/rx.c b/trunk/drivers/net/wireless/libertas/rx.c index 079e6aa874dc..5749f22b296f 100644 --- a/trunk/drivers/net/wireless/libertas/rx.c +++ b/trunk/drivers/net/wireless/libertas/rx.c @@ -328,7 +328,7 @@ static int process_rxed_802_11_packet(struct lbs_private *priv, lbs_deb_rx("rx err: frame received with bad length\n"); priv->stats.rx_length_errors++; ret = -EINVAL; - kfree_skb(skb); + kfree(skb); goto done; } diff --git a/trunk/fs/coda/psdev.c b/trunk/fs/coda/psdev.c index 0376ac66c44a..cfd29da714d1 100644 --- a/trunk/fs/coda/psdev.c +++ b/trunk/fs/coda/psdev.c @@ -2,7 +2,7 @@ * An implementation of a loadable kernel mode driver providing * multiple kernel/user space bidirectional communications links. * - * Author: Alan Cox + * Author: Alan Cox * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/trunk/fs/nfs/inode.c b/trunk/fs/nfs/inode.c index dc52793ff8f8..b9195c02a863 100644 --- a/trunk/fs/nfs/inode.c +++ b/trunk/fs/nfs/inode.c @@ -5,7 +5,7 @@ * * nfs inode and superblock handling functions * - * Modularised by Alan Cox , while hacking some + * Modularised by Alan Cox , while hacking some * experimental NFS changes. Modularisation taken straight from SYS5 fs. * * Change to nfs_read_super() to permit NFS mounts to multi-homed hosts. diff --git a/trunk/fs/nfs/super.c b/trunk/fs/nfs/super.c index f48db679a1c6..a3b0061dfd45 100644 --- a/trunk/fs/nfs/super.c +++ b/trunk/fs/nfs/super.c @@ -5,7 +5,7 @@ * * nfs superblock handling functions * - * Modularised by Alan Cox , while hacking some + * Modularised by Alan Cox , while hacking some * experimental NFS changes. Modularisation taken straight from SYS5 fs. * * Change to nfs_read_super() to permit NFS mounts to multi-homed hosts. diff --git a/trunk/fs/proc/array.c b/trunk/fs/proc/array.c index 6af7fba7abb1..bb9f4b05703d 100644 --- a/trunk/fs/proc/array.c +++ b/trunk/fs/proc/array.c @@ -40,7 +40,7 @@ * * * Alan Cox : security fixes. - * + * * * Al Viro : safe handling of mm_struct * diff --git a/trunk/include/linux/phonet.h b/trunk/include/linux/phonet.h index 4157faa857b6..c9609f9aedac 100644 --- a/trunk/include/linux/phonet.h +++ b/trunk/include/linux/phonet.h @@ -72,7 +72,6 @@ struct phonetmsg { } pn_msg_u; }; #define PN_COMMON_MESSAGE 0xF0 -#define PN_COMMGR 0x10 #define PN_PREFIX 0xE0 /* resource for extended messages */ #define pn_submsg_id pn_msg_u.base.pn_submsg_id #define pn_e_submsg_id pn_msg_u.ext.pn_e_submsg_id diff --git a/trunk/include/net/phonet/phonet.h b/trunk/include/net/phonet/phonet.h index c6a245184460..d4e72508e145 100644 --- a/trunk/include/net/phonet/phonet.h +++ b/trunk/include/net/phonet/phonet.h @@ -27,7 +27,7 @@ * The lower layers may not require more space, ever. Make sure it's * enough. */ -#define MAX_PHONET_HEADER (8 + MAX_HEADER) +#define MAX_PHONET_HEADER 8 /* * Every Phonet* socket has this structure first in its diff --git a/trunk/net/ipv4/tcp_output.c b/trunk/net/ipv4/tcp_output.c index ba85d8831893..e4c5ac9fe89b 100644 --- a/trunk/net/ipv4/tcp_output.c +++ b/trunk/net/ipv4/tcp_output.c @@ -2279,11 +2279,6 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst, } memset(&opts, 0, sizeof(opts)); -#ifdef CONFIG_SYN_COOKIES - if (unlikely(req->cookie_ts)) - TCP_SKB_CB(skb)->when = cookie_init_timestamp(req); - else -#endif TCP_SKB_CB(skb)->when = tcp_time_stamp; tcp_header_size = tcp_synack_options(sk, req, mss, skb, &opts, &md5) + @@ -2309,6 +2304,11 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst, /* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */ th->window = htons(min(req->rcv_wnd, 65535U)); +#ifdef CONFIG_SYN_COOKIES + if (unlikely(req->cookie_ts)) + TCP_SKB_CB(skb)->when = cookie_init_timestamp(req); + else +#endif tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location); th->doff = (tcp_header_size >> 2); TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS); diff --git a/trunk/net/phonet/af_phonet.c b/trunk/net/phonet/af_phonet.c index defeb7a0d502..b9d97effebe3 100644 --- a/trunk/net/phonet/af_phonet.c +++ b/trunk/net/phonet/af_phonet.c @@ -261,8 +261,6 @@ static inline int can_respond(struct sk_buff *skb) return 0; /* we are not the destination */ if (ph->pn_res == PN_PREFIX && !pskb_may_pull(skb, 5)) return 0; - if (ph->pn_res == PN_COMMGR) /* indications */ - return 0; ph = pn_hdr(skb); /* re-acquires the pointer */ pm = pn_msg(skb); @@ -311,8 +309,7 @@ static int send_reset_indications(struct sk_buff *rskb) return pn_raw_send(data, sizeof(data), rskb->dev, pn_object(oph->pn_sdev, 0x00), - pn_object(oph->pn_rdev, oph->pn_robj), - PN_COMMGR); + pn_object(oph->pn_rdev, oph->pn_robj), 0x10); } diff --git a/trunk/sound/oss/kahlua.c b/trunk/sound/oss/kahlua.c index c180598f1710..eb9bc365530d 100644 --- a/trunk/sound/oss/kahlua.c +++ b/trunk/sound/oss/kahlua.c @@ -1,7 +1,7 @@ /* * Initialisation code for Cyrix/NatSemi VSA1 softaudio * - * (C) Copyright 2003 Red Hat Inc + * (C) Copyright 2003 Red Hat Inc * * XpressAudio(tm) is used on the Cyrix MediaGX (now NatSemi Geode) systems. * The older version (VSA1) provides fairly good soundblaster emulation diff --git a/trunk/sound/pci/ad1889.c b/trunk/sound/pci/ad1889.c index a7f38e63303f..92f3a976ef2e 100644 --- a/trunk/sound/pci/ad1889.c +++ b/trunk/sound/pci/ad1889.c @@ -932,7 +932,7 @@ snd_ad1889_create(struct snd_card *card, goto free_and_ret; chip->bar = pci_resource_start(pci, 0); - chip->iobase = pci_ioremap_bar(pci, 0); + chip->iobase = ioremap_nocache(chip->bar, pci_resource_len(pci, 0)); if (chip->iobase == NULL) { printk(KERN_ERR PFX "unable to reserve region.\n"); err = -EBUSY; diff --git a/trunk/sound/pci/atiixp.c b/trunk/sound/pci/atiixp.c index 226fe8237d31..085a52b8c807 100644 --- a/trunk/sound/pci/atiixp.c +++ b/trunk/sound/pci/atiixp.c @@ -1609,7 +1609,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card, return err; } chip->addr = pci_resource_start(pci, 0); - chip->remap_addr = pci_ioremap_bar(pci, 0); + chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci, 0)); if (chip->remap_addr == NULL) { snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); snd_atiixp_free(chip); diff --git a/trunk/sound/pci/atiixp_modem.c b/trunk/sound/pci/atiixp_modem.c index 0e6e5cc1c501..2f106306c7fe 100644 --- a/trunk/sound/pci/atiixp_modem.c +++ b/trunk/sound/pci/atiixp_modem.c @@ -1252,7 +1252,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card, return err; } chip->addr = pci_resource_start(pci, 0); - chip->remap_addr = pci_ioremap_bar(pci, 0); + chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci, 0)); if (chip->remap_addr == NULL) { snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); snd_atiixp_free(chip); diff --git a/trunk/sound/pci/au88x0/au88x0.c b/trunk/sound/pci/au88x0/au88x0.c index a36d4d1fd419..68368e490074 100644 --- a/trunk/sound/pci/au88x0/au88x0.c +++ b/trunk/sound/pci/au88x0/au88x0.c @@ -180,7 +180,8 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) if ((err = pci_request_regions(pci, CARD_NAME_SHORT)) != 0) goto regions_out; - chip->mmio = pci_ioremap_bar(pci, 0); + chip->mmio = ioremap_nocache(pci_resource_start(pci, 0), + pci_resource_len(pci, 0)); if (!chip->mmio) { printk(KERN_ERR "MMIO area remap failed.\n"); err = -ENOMEM; diff --git a/trunk/sound/pci/bt87x.c b/trunk/sound/pci/bt87x.c index 1aa1c0402540..3aa8d973540a 100644 --- a/trunk/sound/pci/bt87x.c +++ b/trunk/sound/pci/bt87x.c @@ -749,7 +749,8 @@ static int __devinit snd_bt87x_create(struct snd_card *card, pci_disable_device(pci); return err; } - chip->mmio = pci_ioremap_bar(pci, 0); + chip->mmio = ioremap_nocache(pci_resource_start(pci, 0), + pci_resource_len(pci, 0)); if (!chip->mmio) { snd_printk(KERN_ERR "cannot remap io memory\n"); err = -ENOMEM; diff --git a/trunk/sound/pci/cs4281.c b/trunk/sound/pci/cs4281.c index 192e7842e181..ef9308f7c45b 100644 --- a/trunk/sound/pci/cs4281.c +++ b/trunk/sound/pci/cs4281.c @@ -1382,8 +1382,8 @@ static int __devinit snd_cs4281_create(struct snd_card *card, chip->ba0_addr = pci_resource_start(pci, 0); chip->ba1_addr = pci_resource_start(pci, 1); - chip->ba0 = pci_ioremap_bar(pci, 0); - chip->ba1 = pci_ioremap_bar(pci, 1); + chip->ba0 = ioremap_nocache(chip->ba0_addr, pci_resource_len(pci, 0)); + chip->ba1 = ioremap_nocache(chip->ba1_addr, pci_resource_len(pci, 1)); if (!chip->ba0 || !chip->ba1) { snd_cs4281_free(chip); return -ENOMEM; diff --git a/trunk/sound/pci/cs5530.c b/trunk/sound/pci/cs5530.c index 6dea5b5cc774..7ff8b68e997e 100644 --- a/trunk/sound/pci/cs5530.c +++ b/trunk/sound/pci/cs5530.c @@ -2,7 +2,7 @@ * cs5530.c - Initialisation code for Cyrix/NatSemi VSA1 softaudio * * (C) Copyright 2007 Ash Willis - * (C) Copyright 2003 Red Hat Inc + * (C) Copyright 2003 Red Hat Inc * * This driver was ported (shamelessly ripped ;) from oss/kahlua.c but I did * mess with it a bit. The chip seems to have to have trouble with full duplex @@ -132,7 +132,7 @@ static int __devinit snd_cs5530_create(struct snd_card *card, } chip->pci_base = pci_resource_start(pci, 0); - mem = pci_ioremap_bar(pci, 0); + mem = ioremap_nocache(chip->pci_base, pci_resource_len(pci, 0)); if (mem == NULL) { kfree(chip); pci_disable_device(pci); diff --git a/trunk/sound/pci/hda/hda_intel.c b/trunk/sound/pci/hda/hda_intel.c index f080f8ce0ecb..9f316c1b2790 100644 --- a/trunk/sound/pci/hda/hda_intel.c +++ b/trunk/sound/pci/hda/hda_intel.c @@ -2158,7 +2158,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, } chip->addr = pci_resource_start(pci, 0); - chip->remap_addr = pci_ioremap_bar(pci, 0); + chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci,0)); if (chip->remap_addr == NULL) { snd_printk(KERN_ERR SFX "ioremap error\n"); err = -ENXIO; diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index 4eceab9bd109..ef4955c73c88 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/sound/pci/hda/patch_realtek.c @@ -307,13 +307,6 @@ struct alc_spec { /* for PLL fix */ hda_nid_t pll_nid; unsigned int pll_coef_idx, pll_coef_bit; - -#ifdef SND_HDA_NEEDS_RESUME -#define ALC_MAX_PINS 16 - unsigned int num_pins; - hda_nid_t pin_nids[ALC_MAX_PINS]; - unsigned int pin_cfgs[ALC_MAX_PINS]; -#endif }; /* @@ -2785,64 +2778,6 @@ static void alc_free(struct hda_codec *codec) codec->spec = NULL; /* to be sure */ } -#ifdef SND_HDA_NEEDS_RESUME -static void store_pin_configs(struct hda_codec *codec) -{ - struct alc_spec *spec = codec->spec; - hda_nid_t nid, end_nid; - - end_nid = codec->start_nid + codec->num_nodes; - for (nid = codec->start_nid; nid < end_nid; nid++) { - unsigned int wid_caps = get_wcaps(codec, nid); - unsigned int wid_type = - (wid_caps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT; - if (wid_type != AC_WID_PIN) - continue; - if (spec->num_pins >= ARRAY_SIZE(spec->pin_nids)) - break; - spec->pin_nids[spec->num_pins] = nid; - spec->pin_cfgs[spec->num_pins] = - snd_hda_codec_read(codec, nid, 0, - AC_VERB_GET_CONFIG_DEFAULT, 0); - spec->num_pins++; - } -} - -static void resume_pin_configs(struct hda_codec *codec) -{ - struct alc_spec *spec = codec->spec; - int i; - - for (i = 0; i < spec->num_pins; i++) { - hda_nid_t pin_nid = spec->pin_nids[i]; - unsigned int pin_config = spec->pin_cfgs[i]; - snd_hda_codec_write(codec, pin_nid, 0, - AC_VERB_SET_CONFIG_DEFAULT_BYTES_0, - pin_config & 0x000000ff); - snd_hda_codec_write(codec, pin_nid, 0, - AC_VERB_SET_CONFIG_DEFAULT_BYTES_1, - (pin_config & 0x0000ff00) >> 8); - snd_hda_codec_write(codec, pin_nid, 0, - AC_VERB_SET_CONFIG_DEFAULT_BYTES_2, - (pin_config & 0x00ff0000) >> 16); - snd_hda_codec_write(codec, pin_nid, 0, - AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, - pin_config >> 24); - } -} - -static int alc_resume(struct hda_codec *codec) -{ - resume_pin_configs(codec); - codec->patch_ops.init(codec); - snd_hda_codec_resume_amp(codec); - snd_hda_codec_resume_cache(codec); - return 0; -} -#else -#define store_pin_configs(codec) -#endif - /* */ static struct hda_codec_ops alc_patch_ops = { @@ -2851,9 +2786,6 @@ static struct hda_codec_ops alc_patch_ops = { .init = alc_init, .free = alc_free, .unsol_event = alc_unsol_event, -#ifdef SND_HDA_NEEDS_RESUME - .resume = alc_resume, -#endif #ifdef CONFIG_SND_HDA_POWER_SAVE .check_power_status = alc_check_power_status, #endif @@ -3900,7 +3832,6 @@ static int alc880_parse_auto_config(struct hda_codec *codec) spec->num_mux_defs = 1; spec->input_mux = &spec->private_imux; - store_pin_configs(codec); return 1; } @@ -5319,7 +5250,6 @@ static int alc260_parse_auto_config(struct hda_codec *codec) } spec->num_mixers++; - store_pin_configs(codec); return 1; } @@ -10383,7 +10313,6 @@ static int alc262_parse_auto_config(struct hda_codec *codec) if (err < 0) return err; - store_pin_configs(codec); return 1; } @@ -11518,7 +11447,6 @@ static int alc268_parse_auto_config(struct hda_codec *codec) if (err < 0) return err; - store_pin_configs(codec); return 1; } @@ -12302,7 +12230,6 @@ static int alc269_parse_auto_config(struct hda_codec *codec) spec->mixers[spec->num_mixers] = alc269_capture_mixer; spec->num_mixers++; - store_pin_configs(codec); return 1; } @@ -13389,7 +13316,6 @@ static int alc861_parse_auto_config(struct hda_codec *codec) spec->mixers[spec->num_mixers] = alc861_capture_mixer; spec->num_mixers++; - store_pin_configs(codec); return 1; } @@ -14501,7 +14427,6 @@ static int alc861vd_parse_auto_config(struct hda_codec *codec) if (err < 0) return err; - store_pin_configs(codec); return 1; } @@ -16333,8 +16258,6 @@ static int alc662_parse_auto_config(struct hda_codec *codec) spec->mixers[spec->num_mixers] = alc662_capture_mixer; spec->num_mixers++; - - store_pin_configs(codec); return 1; } diff --git a/trunk/sound/pci/mixart/mixart.c b/trunk/sound/pci/mixart/mixart.c index ae7601f353a7..2d0dce649a64 100644 --- a/trunk/sound/pci/mixart/mixart.c +++ b/trunk/sound/pci/mixart/mixart.c @@ -1314,7 +1314,8 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci, } for (i = 0; i < 2; i++) { mgr->mem[i].phys = pci_resource_start(pci, i); - mgr->mem[i].virt = pci_ioremap_bar(pci, i); + mgr->mem[i].virt = ioremap_nocache(mgr->mem[i].phys, + pci_resource_len(pci, i)); if (!mgr->mem[i].virt) { printk(KERN_ERR "unable to remap resource 0x%lx\n", mgr->mem[i].phys); diff --git a/trunk/sound/soc/blackfin/bf5xx-i2s.c b/trunk/sound/soc/blackfin/bf5xx-i2s.c index e020c160ee44..827587f08180 100644 --- a/trunk/sound/soc/blackfin/bf5xx-i2s.c +++ b/trunk/sound/soc/blackfin/bf5xx-i2s.c @@ -70,24 +70,12 @@ static struct sport_param sport_params[2] = { } }; -/* - * Setting the TFS pin selector for SPORT 0 based on whether the selected - * port id F or G. If the port is F then no conflict should exist for the - * TFS. When Port G is selected and EMAC then there is a conflict between - * the PHY interrupt line and TFS. Current settings prevent the conflict - * by ignoring the TFS pin when Port G is selected. This allows both - * ssm2602 using Port G and EMAC concurrently. - */ -#ifdef CONFIG_BF527_SPORT0_PORTF -#define LOCAL_SPORT0_TFS (P_SPORT0_TFS) -#else -#define LOCAL_SPORT0_TFS (0) -#endif - -static u16 sport_req[][7] = { {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, - P_SPORT0_DRPRI, P_SPORT0_RSCLK, LOCAL_SPORT0_TFS, 0}, - {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, P_SPORT1_DRPRI, - P_SPORT1_RSCLK, P_SPORT1_TFS, 0} }; +static u16 sport_req[][7] = { + { P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, + P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0}, + { P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, + P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0}, +}; static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) @@ -110,21 +98,23 @@ static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, ret = -EINVAL; break; default: - printk(KERN_ERR "%s: Unknown DAI format type\n", __func__); ret = -EINVAL; break; } switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBM_CFM: - break; case SND_SOC_DAIFMT_CBS_CFS: + ret = -EINVAL; + break; case SND_SOC_DAIFMT_CBM_CFS: + ret = -EINVAL; + break; + case SND_SOC_DAIFMT_CBM_CFM: + break; case SND_SOC_DAIFMT_CBS_CFM: ret = -EINVAL; break; default: - printk(KERN_ERR "%s: Unknown DAI master type\n", __func__); ret = -EINVAL; break; } diff --git a/trunk/sound/sound_core.c b/trunk/sound/sound_core.c index a75b289a5d78..faef87a9bc3f 100644 --- a/trunk/sound/sound_core.c +++ b/trunk/sound/sound_core.c @@ -57,7 +57,7 @@ module_exit(cleanup_soundcore); /* * OSS sound core handling. Breaks out sound functions to submodules * - * Author: Alan Cox + * Author: Alan Cox * * Fixes: *