From 30743f69b0dd86dd26c92c3812b403951a899e78 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 18 Jun 2009 10:19:12 +0200 Subject: [PATCH] --- yaml --- r: 156152 b: refs/heads/master c: 6de7e356faf54aa75de5b624bbce28a5b776dfa8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/scatterlist.h | 2 ++ trunk/lib/scatterlist.c | 16 ++++++++++++---- trunk/sound/aoa/core/gpio-pmf.c | 4 ---- trunk/sound/oss/aedsp16.c | 9 ++++----- trunk/sound/oss/mpu401.c | 2 +- trunk/sound/pci/hda/hda_eld.c | 4 ++-- trunk/sound/pci/hda/patch_realtek.c | 4 ++-- trunk/sound/pci/hda/patch_sigmatel.c | 2 -- 9 files changed, 24 insertions(+), 21 deletions(-) diff --git a/[refs] b/[refs] index 325a4ff2eed4..aa5b8e81b5a6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dbe63a2cde07f4bccb2b2e4b35241491d8e096f6 +refs/heads/master: 6de7e356faf54aa75de5b624bbce28a5b776dfa8 diff --git a/trunk/include/linux/scatterlist.h b/trunk/include/linux/scatterlist.h index e5996984ddd0..9aaf5bfdad1a 100644 --- a/trunk/include/linux/scatterlist.h +++ b/trunk/include/linux/scatterlist.h @@ -242,6 +242,8 @@ size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, */ #define SG_MITER_ATOMIC (1 << 0) /* use kmap_atomic */ +#define SG_MITER_TO_SG (1 << 1) /* flush back to phys on unmap */ +#define SG_MITER_FROM_SG (1 << 2) /* nop */ struct sg_mapping_iter { /* the following three fields can be accessed directly */ diff --git a/trunk/lib/scatterlist.c b/trunk/lib/scatterlist.c index a295e404e908..0d475d8167bf 100644 --- a/trunk/lib/scatterlist.c +++ b/trunk/lib/scatterlist.c @@ -314,6 +314,7 @@ void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl, miter->__sg = sgl; miter->__nents = nents; miter->__offset = 0; + WARN_ON(!(flags & (SG_MITER_TO_SG | SG_MITER_FROM_SG))); miter->__flags = flags; } EXPORT_SYMBOL(sg_miter_start); @@ -394,6 +395,9 @@ void sg_miter_stop(struct sg_mapping_iter *miter) if (miter->addr) { miter->__offset += miter->consumed; + if (miter->__flags & SG_MITER_TO_SG) + flush_kernel_dcache_page(miter->page); + if (miter->__flags & SG_MITER_ATOMIC) { WARN_ON(!irqs_disabled()); kunmap_atomic(miter->addr, KM_BIO_SRC_IRQ); @@ -426,8 +430,14 @@ static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, unsigned int offset = 0; struct sg_mapping_iter miter; unsigned long flags; + unsigned int sg_flags = SG_MITER_ATOMIC; + + if (to_buffer) + sg_flags |= SG_MITER_FROM_SG; + else + sg_flags |= SG_MITER_TO_SG; - sg_miter_start(&miter, sgl, nents, SG_MITER_ATOMIC); + sg_miter_start(&miter, sgl, nents, sg_flags); local_irq_save(flags); @@ -438,10 +448,8 @@ static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, if (to_buffer) memcpy(buf + offset, miter.addr, len); - else { + else memcpy(miter.addr, buf + offset, len); - flush_kernel_dcache_page(miter.page); - } offset += len; } diff --git a/trunk/sound/aoa/core/gpio-pmf.c b/trunk/sound/aoa/core/gpio-pmf.c index 1dd0c28d1fb7..5ca2220eac7d 100644 --- a/trunk/sound/aoa/core/gpio-pmf.c +++ b/trunk/sound/aoa/core/gpio-pmf.c @@ -182,10 +182,6 @@ static int pmf_set_notify(struct gpio_runtime *rt, if (!old && notify) { irq_client = kzalloc(sizeof(struct pmf_irq_client), GFP_KERNEL); - if (!irq_client) { - err = -ENOMEM; - goto out_unlock; - } irq_client->data = notif; irq_client->handler = pmf_handle_notify_irq; irq_client->owner = THIS_MODULE; diff --git a/trunk/sound/oss/aedsp16.c b/trunk/sound/oss/aedsp16.c index 35b5912cf3f8..3ee9900ffd7b 100644 --- a/trunk/sound/oss/aedsp16.c +++ b/trunk/sound/oss/aedsp16.c @@ -325,9 +325,8 @@ /* * Size of character arrays that store name and version of sound card */ -#define CARDNAMELEN 15 /* Size of the card's name in chars */ -#define CARDVERLEN 10 /* Size of the card's version in chars */ -#define CARDVERDIGITS 2 /* Number of digits in the version */ +#define CARDNAMELEN 15 /* Size of the card's name in chars */ +#define CARDVERLEN 2 /* Size of the card's version in chars */ #if defined(CONFIG_SC6600) /* @@ -411,7 +410,7 @@ static int soft_cfg __initdata = 0; /* bitmapped config */ static int soft_cfg_mss __initdata = 0; /* bitmapped mss config */ -static int ver[CARDVERDIGITS] __initdata = {0, 0}; /* DSP Ver: +static int ver[CARDVERLEN] __initdata = {0, 0}; /* DSP Ver: hi->ver[0] lo->ver[1] */ #if defined(CONFIG_SC6600) @@ -958,7 +957,7 @@ static int __init aedsp16_dsp_version(int port) * string is finished. */ ver[len++] = ret; - } while (len < CARDVERDIGITS); + } while (len < CARDVERLEN); sprintf(DSPVersion, "%d.%d", ver[0], ver[1]); DBG(("success.\n")); diff --git a/trunk/sound/oss/mpu401.c b/trunk/sound/oss/mpu401.c index 734b8f9e2f78..1b2316f35b1f 100644 --- a/trunk/sound/oss/mpu401.c +++ b/trunk/sound/oss/mpu401.c @@ -1074,7 +1074,7 @@ int attach_mpu401(struct address_info *hw_config, struct module *owner) sprintf(mpu_synth_info[m].name, "%s (MPU401)", hw_config->name); else sprintf(mpu_synth_info[m].name, - "MPU-401 %d.%d%c MIDI #%d", + "MPU-401 %d.%d%c Midi interface #%d", (int) (devc->version & 0xf0) >> 4, devc->version & 0x0f, revision_char, diff --git a/trunk/sound/pci/hda/hda_eld.c b/trunk/sound/pci/hda/hda_eld.c index 9446a5abea13..fcad5ec31773 100644 --- a/trunk/sound/pci/hda/hda_eld.c +++ b/trunk/sound/pci/hda/hda_eld.c @@ -508,7 +508,7 @@ static void hdmi_write_eld_info(struct snd_info_entry *entry, char name[64]; char *sname; long long val; - unsigned int n; + int n; while (!snd_info_get_line(buffer, line, sizeof(line))) { if (sscanf(line, "%s %llx", name, &val) != 2) @@ -539,7 +539,7 @@ static void hdmi_write_eld_info(struct snd_info_entry *entry, sname++; n = 10 * n + name[4] - '0'; } - if (n >= ELD_MAX_SAD) + if (n < 0 || n > 31) /* double the CEA limit */ continue; if (!strcmp(sname, "_coding_type")) e->sad[n].format = val; diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index b95df5d5dcc2..8c8b273116fb 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/sound/pci/hda/patch_realtek.c @@ -275,13 +275,13 @@ struct alc_spec { */ unsigned int num_init_verbs; - char stream_name_analog[32]; /* analog PCM stream */ + char stream_name_analog[16]; /* analog PCM stream */ struct hda_pcm_stream *stream_analog_playback; struct hda_pcm_stream *stream_analog_capture; struct hda_pcm_stream *stream_analog_alt_playback; struct hda_pcm_stream *stream_analog_alt_capture; - char stream_name_digital[32]; /* digital PCM stream */ + char stream_name_digital[16]; /* digital PCM stream */ struct hda_pcm_stream *stream_digital_playback; struct hda_pcm_stream *stream_digital_capture; diff --git a/trunk/sound/pci/hda/patch_sigmatel.c b/trunk/sound/pci/hda/patch_sigmatel.c index 5383d8cff88b..512f3b9b9a45 100644 --- a/trunk/sound/pci/hda/patch_sigmatel.c +++ b/trunk/sound/pci/hda/patch_sigmatel.c @@ -1809,8 +1809,6 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { "Dell Studio 1537", STAC_DELL_M6_DMIC), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0, "Dell Studio 17", STAC_DELL_M6_DMIC), - SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02be, - "Dell Studio 1555", STAC_DELL_M6_DMIC), {} /* terminator */ };