Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349404
b: refs/heads/master
c: ff0d05b
h: refs/heads/master
v: v3
  • Loading branch information
Dave Airlie committed Jan 31, 2013
1 parent 0c2cc2b commit 0a1f1b4
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 83 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a56e16009855b2b528c36aa56b7ab8b209bb15e0
refs/heads/master: ff0d05bf73620eb7dc8aee7423e992ef87870bdf
6 changes: 3 additions & 3 deletions trunk/drivers/edac/edac_mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
/*
* Alocate and fill the csrow/channels structs
*/
mci->csrows = kcalloc(tot_csrows, sizeof(*mci->csrows), GFP_KERNEL);
mci->csrows = kcalloc(sizeof(*mci->csrows), tot_csrows, GFP_KERNEL);
if (!mci->csrows)
goto error;
for (row = 0; row < tot_csrows; row++) {
Expand All @@ -351,7 +351,7 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
csr->csrow_idx = row;
csr->mci = mci;
csr->nr_channels = tot_channels;
csr->channels = kcalloc(tot_channels, sizeof(*csr->channels),
csr->channels = kcalloc(sizeof(*csr->channels), tot_channels,
GFP_KERNEL);
if (!csr->channels)
goto error;
Expand All @@ -369,7 +369,7 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
/*
* Allocate and fill the dimm structs
*/
mci->dimms = kcalloc(tot_dimms, sizeof(*mci->dimms), GFP_KERNEL);
mci->dimms = kcalloc(sizeof(*mci->dimms), tot_dimms, GFP_KERNEL);
if (!mci->dimms)
goto error;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/edac/edac_pci_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static ssize_t edac_pci_dev_store(struct kobject *kobj,
struct edac_pci_dev_attribute *edac_pci_dev;
edac_pci_dev = (struct edac_pci_dev_attribute *)attr;

if (edac_pci_dev->store)
if (edac_pci_dev->show)
return edac_pci_dev->store(edac_pci_dev->value, buffer, count);
return -EIO;
}
Expand Down
9 changes: 0 additions & 9 deletions trunk/kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ static DEFINE_SEMAPHORE(console_sem);
struct console *console_drivers;
EXPORT_SYMBOL_GPL(console_drivers);

#ifdef CONFIG_LOCKDEP
static struct lockdep_map console_lock_dep_map = {
.name = "console_lock"
};
#endif

/*
* This is used for debugging the mess that is the VT code by
* keeping track if we have the console semaphore held. It's
Expand Down Expand Up @@ -1924,7 +1918,6 @@ void console_lock(void)
return;
console_locked = 1;
console_may_schedule = 1;
mutex_acquire(&console_lock_dep_map, 0, 0, _RET_IP_);
}
EXPORT_SYMBOL(console_lock);

Expand All @@ -1946,7 +1939,6 @@ int console_trylock(void)
}
console_locked = 1;
console_may_schedule = 0;
mutex_acquire(&console_lock_dep_map, 0, 1, _RET_IP_);
return 1;
}
EXPORT_SYMBOL(console_trylock);
Expand Down Expand Up @@ -2107,7 +2099,6 @@ void console_unlock(void)
local_irq_restore(flags);
}
console_locked = 0;
mutex_release(&console_lock_dep_map, 1, _RET_IP_);

/* Release the exclusive_console once it is used */
if (unlikely(exclusive_console))
Expand Down
49 changes: 19 additions & 30 deletions trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,43 +656,29 @@ static char *driver_short_names[] = {
#define get_azx_dev(substream) (substream->runtime->private_data)

#ifdef CONFIG_X86
static void __mark_pages_wc(struct azx *chip, struct snd_dma_buffer *dmab, bool on)
static void __mark_pages_wc(struct azx *chip, void *addr, size_t size, bool on)
{
int pages;

if (azx_snoop(chip))
return;
if (!dmab || !dmab->area || !dmab->bytes)
return;

#ifdef CONFIG_SND_DMA_SGBUF
if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_SG) {
struct snd_sg_buf *sgbuf = dmab->private_data;
if (addr && size) {
int pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
if (on)
set_pages_array_wc(sgbuf->page_table, sgbuf->pages);
set_memory_wc((unsigned long)addr, pages);
else
set_pages_array_wb(sgbuf->page_table, sgbuf->pages);
return;
set_memory_wb((unsigned long)addr, pages);
}
#endif

pages = (dmab->bytes + PAGE_SIZE - 1) >> PAGE_SHIFT;
if (on)
set_memory_wc((unsigned long)dmab->area, pages);
else
set_memory_wb((unsigned long)dmab->area, pages);
}

static inline void mark_pages_wc(struct azx *chip, struct snd_dma_buffer *buf,
bool on)
{
__mark_pages_wc(chip, buf, on);
__mark_pages_wc(chip, buf->area, buf->bytes, on);
}
static inline void mark_runtime_wc(struct azx *chip, struct azx_dev *azx_dev,
struct snd_pcm_substream *substream, bool on)
struct snd_pcm_runtime *runtime, bool on)
{
if (azx_dev->wc_marked != on) {
__mark_pages_wc(chip, snd_pcm_get_dma_buf(substream), on);
__mark_pages_wc(chip, runtime->dma_area, runtime->dma_bytes, on);
azx_dev->wc_marked = on;
}
}
Expand All @@ -703,7 +689,7 @@ static inline void mark_pages_wc(struct azx *chip, struct snd_dma_buffer *buf,
{
}
static inline void mark_runtime_wc(struct azx *chip, struct azx_dev *azx_dev,
struct snd_pcm_substream *substream, bool on)
struct snd_pcm_runtime *runtime, bool on)
{
}
#endif
Expand Down Expand Up @@ -1982,18 +1968,19 @@ static int azx_pcm_hw_params(struct snd_pcm_substream *substream,
{
struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
struct azx *chip = apcm->chip;
struct snd_pcm_runtime *runtime = substream->runtime;
struct azx_dev *azx_dev = get_azx_dev(substream);
int ret;

mark_runtime_wc(chip, azx_dev, substream, false);
mark_runtime_wc(chip, azx_dev, runtime, false);
azx_dev->bufsize = 0;
azx_dev->period_bytes = 0;
azx_dev->format_val = 0;
ret = snd_pcm_lib_malloc_pages(substream,
params_buffer_bytes(hw_params));
if (ret < 0)
return ret;
mark_runtime_wc(chip, azx_dev, substream, true);
mark_runtime_wc(chip, azx_dev, runtime, true);
return ret;
}

Expand All @@ -2002,6 +1989,7 @@ static int azx_pcm_hw_free(struct snd_pcm_substream *substream)
struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
struct azx_dev *azx_dev = get_azx_dev(substream);
struct azx *chip = apcm->chip;
struct snd_pcm_runtime *runtime = substream->runtime;
struct hda_pcm_stream *hinfo = apcm->hinfo[substream->stream];

/* reset BDL address */
Expand All @@ -2014,7 +2002,7 @@ static int azx_pcm_hw_free(struct snd_pcm_substream *substream)

snd_hda_codec_cleanup(apcm->codec, hinfo, substream);

mark_runtime_wc(chip, azx_dev, substream, false);
mark_runtime_wc(chip, azx_dev, runtime, false);
return snd_pcm_lib_free_pages(substream);
}

Expand Down Expand Up @@ -3625,12 +3613,13 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
/* 5 Series/3400 */
{ PCI_DEVICE(0x8086, 0x3b56),
.driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH },
/* Poulsbo */
/* SCH */
{ PCI_DEVICE(0x8086, 0x811b),
.driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM },
/* Oaktrail */
.driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP |
AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_LPIB }, /* Poulsbo */
{ PCI_DEVICE(0x8086, 0x080a),
.driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM },
.driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP |
AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_LPIB }, /* Oaktrail */
/* ICH */
{ PCI_DEVICE(0x8086, 0x2668),
.driver_data = AZX_DRIVER_ICH | AZX_DCAPS_OLD_SSYNC |
Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -4694,7 +4694,6 @@ static const struct snd_pci_quirk alc880_fixup_tbl[] = {
SND_PCI_QUIRK(0x1584, 0x9077, "Uniwill P53", ALC880_FIXUP_VOL_KNOB),
SND_PCI_QUIRK(0x161f, 0x203d, "W810", ALC880_FIXUP_W810),
SND_PCI_QUIRK(0x161f, 0x205d, "Medion Rim 2150", ALC880_FIXUP_MEDION_RIM),
SND_PCI_QUIRK(0x1631, 0xe011, "PB 13201056", ALC880_FIXUP_6ST),
SND_PCI_QUIRK(0x1734, 0x107c, "FSC F1734", ALC880_FIXUP_F1734),
SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FIXUP_FUJITSU),
SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_FIXUP_F1734),
Expand Down Expand Up @@ -5709,7 +5708,6 @@ static const struct alc_model_fixup alc268_fixup_models[] = {
};

static const struct snd_pci_quirk alc268_fixup_tbl[] = {
SND_PCI_QUIRK(0x1025, 0x015b, "Acer AOA 150 (ZG5)", ALC268_FIXUP_INV_DMIC),
/* below is codec SSID since multiple Toshiba laptops have the
* same PCI SSID 1179:ff00
*/
Expand Down
5 changes: 1 addition & 4 deletions trunk/sound/soc/codecs/arizona.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
}
sr_val = i;

lrclk = rates[bclk] / params_rate(params);
lrclk = snd_soc_params_to_bclk(params) / params_rate(params);

arizona_aif_dbg(dai, "BCLK %dHz LRCLK %dHz\n",
rates[bclk], rates[bclk] / lrclk);
Expand Down Expand Up @@ -1082,9 +1082,6 @@ int arizona_init_fll(struct arizona *arizona, int id, int base, int lock_irq,
id, ret);
}

regmap_update_bits(arizona->regmap, fll->base + 1,
ARIZONA_FLL1_FREERUN, 0);

return 0;
}
EXPORT_SYMBOL_GPL(arizona_init_fll);
Expand Down
3 changes: 3 additions & 0 deletions trunk/sound/soc/codecs/wm2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,8 @@ static const char *wm2200_mixer_texts[] = {
"EQR",
"LHPF1",
"LHPF2",
"LHPF3",
"LHPF4",
"DSP1.1",
"DSP1.2",
"DSP1.3",
Expand Down Expand Up @@ -1051,6 +1053,7 @@ static int wm2200_mixer_values[] = {
0x25,
0x50, /* EQ */
0x51,
0x52,
0x60, /* LHPF1 */
0x61, /* LHPF2 */
0x68, /* DSP1 */
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/soc/codecs/wm5102.c
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,8 @@ static const unsigned int wm5102_aec_loopback_values[] = {

static const struct soc_enum wm5102_aec_loopback =
SOC_VALUE_ENUM_SINGLE(ARIZONA_DAC_AEC_CONTROL_1,
ARIZONA_AEC_LOOPBACK_SRC_SHIFT, 0xf,
ARIZONA_AEC_LOOPBACK_SRC_SHIFT,
ARIZONA_AEC_LOOPBACK_SRC_MASK,
ARRAY_SIZE(wm5102_aec_loopback_texts),
wm5102_aec_loopback_texts,
wm5102_aec_loopback_values);
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/soc/codecs/wm5110.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ static const unsigned int wm5110_aec_loopback_values[] = {

static const struct soc_enum wm5110_aec_loopback =
SOC_VALUE_ENUM_SINGLE(ARIZONA_DAC_AEC_CONTROL_1,
ARIZONA_AEC_LOOPBACK_SRC_SHIFT, 0xf,
ARIZONA_AEC_LOOPBACK_SRC_SHIFT,
ARIZONA_AEC_LOOPBACK_SRC_MASK,
ARRAY_SIZE(wm5110_aec_loopback_texts),
wm5110_aec_loopback_texts,
wm5110_aec_loopback_values);
Expand Down
6 changes: 3 additions & 3 deletions trunk/sound/soc/codecs/wm_adsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ static int wm_adsp_load(struct wm_adsp *dsp)

if (reg) {
buf = kmemdup(region->data, le32_to_cpu(region->len),
GFP_KERNEL | GFP_DMA);
GFP_KERNEL);
if (!buf) {
adsp_err(dsp, "Out of memory\n");
return -ENOMEM;
Expand Down Expand Up @@ -396,7 +396,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
hdr = (void*)&firmware->data[0];
if (memcmp(hdr->magic, "WMDR", 4) != 0) {
adsp_err(dsp, "%s: invalid magic\n", file);
goto out_fw;
return -EINVAL;
}

adsp_dbg(dsp, "%s: v%d.%d.%d\n", file,
Expand Down Expand Up @@ -439,7 +439,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)

if (reg) {
buf = kmemdup(blk->data, le32_to_cpu(blk->len),
GFP_KERNEL | GFP_DMA);
GFP_KERNEL);
if (!buf) {
adsp_err(dsp, "Out of memory\n");
return -ENOMEM;
Expand Down
9 changes: 7 additions & 2 deletions trunk/sound/soc/fsl/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,18 @@ if SND_IMX_SOC
config SND_SOC_IMX_SSI
tristate

config SND_SOC_IMX_PCM_FIQ
config SND_SOC_IMX_PCM
tristate

config SND_SOC_IMX_PCM_FIQ
bool
select FIQ
select SND_SOC_IMX_PCM

config SND_SOC_IMX_PCM_DMA
tristate
bool
select SND_SOC_DMAENGINE_PCM
select SND_SOC_IMX_PCM

config SND_SOC_IMX_AUDMUX
tristate
Expand Down
5 changes: 1 addition & 4 deletions trunk/sound/soc/fsl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ endif
obj-$(CONFIG_SND_SOC_IMX_SSI) += snd-soc-imx-ssi.o
obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o

obj-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += snd-soc-imx-pcm-fiq.o
snd-soc-imx-pcm-fiq-y := imx-pcm-fiq.o imx-pcm.o
obj-$(CONFIG_SND_SOC_IMX_PCM_DMA) += snd-soc-imx-pcm-dma.o
snd-soc-imx-pcm-dma-y := imx-pcm-dma.o imx-pcm.o
obj-$(CONFIG_SND_SOC_IMX_PCM) += snd-soc-imx-pcm.o

# i.MX Machine Support
snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o
Expand Down
3 changes: 3 additions & 0 deletions trunk/sound/soc/fsl/imx-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ int snd_imx_pcm_mmap(struct snd_pcm_substream *substream,
runtime->dma_bytes);
return ret;
}
EXPORT_SYMBOL_GPL(snd_imx_pcm_mmap);

static int imx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream)
{
Expand Down Expand Up @@ -79,6 +80,7 @@ int imx_pcm_new(struct snd_soc_pcm_runtime *rtd)
out:
return ret;
}
EXPORT_SYMBOL_GPL(imx_pcm_new);

void imx_pcm_free(struct snd_pcm *pcm)
{
Expand All @@ -100,6 +102,7 @@ void imx_pcm_free(struct snd_pcm *pcm)
buf->area = NULL;
}
}
EXPORT_SYMBOL_GPL(imx_pcm_free);

MODULE_DESCRIPTION("Freescale i.MX PCM driver");
MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
Expand Down
12 changes: 2 additions & 10 deletions trunk/sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ int dapm_regulator_event(struct snd_soc_dapm_widget *w,

if (SND_SOC_DAPM_EVENT_ON(event)) {
if (w->invert & SND_SOC_DAPM_REGULATOR_BYPASS) {
ret = regulator_allow_bypass(w->regulator, false);
ret = regulator_allow_bypass(w->regulator, true);
if (ret != 0)
dev_warn(w->dapm->dev,
"ASoC: Failed to bypass %s: %d\n",
Expand All @@ -1033,7 +1033,7 @@ int dapm_regulator_event(struct snd_soc_dapm_widget *w,
return regulator_enable(w->regulator);
} else {
if (w->invert & SND_SOC_DAPM_REGULATOR_BYPASS) {
ret = regulator_allow_bypass(w->regulator, true);
ret = regulator_allow_bypass(w->regulator, false);
if (ret != 0)
dev_warn(w->dapm->dev,
"ASoC: Failed to unbypass %s: %d\n",
Expand Down Expand Up @@ -3039,14 +3039,6 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
w->name, ret);
return NULL;
}

if (w->invert & SND_SOC_DAPM_REGULATOR_BYPASS) {
ret = regulator_allow_bypass(w->regulator, true);
if (ret != 0)
dev_warn(w->dapm->dev,
"ASoC: Failed to unbypass %s: %d\n",
w->name, ret);
}
break;
case snd_soc_dapm_clock_supply:
#ifdef CONFIG_CLKDEV_LOOKUP
Expand Down
Loading

0 comments on commit 0a1f1b4

Please sign in to comment.