Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221579
b: refs/heads/master
c: 0660a9b
h: refs/heads/master
i:
  221577: 52258ef
  221575: 3d948c5
v: v3
  • Loading branch information
Linus Torvalds committed Nov 5, 2010
1 parent 285f46c commit ee22e76
Show file tree
Hide file tree
Showing 28 changed files with 104 additions and 75 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: d02db4f8d79c5841ba32b326edb75ea6acd081ca
refs/heads/master: 0660a9b16ad502874de3e793875fa23eed7b038a
2 changes: 2 additions & 0 deletions trunk/arch/m68k/include/asm/irqflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#define _M68K_IRQFLAGS_H

#include <linux/types.h>
#ifdef CONFIG_MMU
#include <linux/hardirq.h>
#endif
#include <linux/preempt.h>
#include <asm/thread_info.h>
#include <asm/entry.h>
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/m68k/include/asm/machdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ extern unsigned long hw_timer_offset(void);
extern irqreturn_t arch_timer_interrupt(int irq, void *dummy);

extern void config_BSP(char *command, int len);
extern void do_IRQ(int irq, struct pt_regs *fp);

#endif /* _M68K_MACHDEP_H */
2 changes: 2 additions & 0 deletions trunk/drivers/leds/leds-net5501.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,5 @@ static int __init soekris_init(void)
}

arch_initcall(soekris_init);

MODULE_LICENSE("GPL");
2 changes: 0 additions & 2 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -5410,9 +5410,7 @@ int ext4_getattr(struct vfsmount *mnt, struct dentry *dentry,
* will return the blocks that include the delayed allocation
* blocks for this file.
*/
spin_lock(&EXT4_I(inode)->i_block_reservation_lock);
delalloc_blocks = EXT4_I(inode)->i_reserved_data_blocks;
spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);

stat->blocks += (delalloc_blocks << inode->i_sb->s_blocksize_bits)>>9;
return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/logfs/logfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ static inline int logfs_get_sb_bdev(struct logfs_super *s,

/* dev_mtd.c */
#ifdef CONFIG_MTD
int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr)
int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr);
#else
static inline int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr)
{
Expand Down
8 changes: 6 additions & 2 deletions trunk/include/linux/hardirq.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,15 @@
*/
#define in_nmi() (preempt_count() & NMI_MASK)

#if defined(CONFIG_PREEMPT)
#if defined(CONFIG_PREEMPT) && defined(CONFIG_BKL)
# define PREEMPT_INATOMIC_BASE kernel_locked()
# define PREEMPT_CHECK_OFFSET 1
#else
# define PREEMPT_INATOMIC_BASE 0
#endif

#if defined(CONFIG_PREEMPT)
# define PREEMPT_CHECK_OFFSET 1
#else
# define PREEMPT_CHECK_OFFSET 0
#endif

Expand Down
15 changes: 4 additions & 11 deletions trunk/kernel/relay.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,10 @@ static const struct vm_operations_struct relay_file_mmap_ops = {
*/
static struct page **relay_alloc_page_array(unsigned int n_pages)
{
struct page **array;
size_t pa_size = n_pages * sizeof(struct page *);

if (pa_size > PAGE_SIZE) {
array = vmalloc(pa_size);
if (array)
memset(array, 0, pa_size);
} else {
array = kzalloc(pa_size, GFP_KERNEL);
}
return array;
const size_t pa_size = n_pages * sizeof(struct page *);
if (pa_size > PAGE_SIZE)
return vzalloc(pa_size);
return kzalloc(pa_size, GFP_KERNEL);
}

/*
Expand Down
4 changes: 3 additions & 1 deletion trunk/mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1563,8 +1563,10 @@ int filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
goto no_cached_page;
}

if (!lock_page_or_retry(page, vma->vm_mm, vmf->flags))
if (!lock_page_or_retry(page, vma->vm_mm, vmf->flags)) {
page_cache_release(page);
return ret | VM_FAULT_RETRY;
}

/* Did it get truncated? */
if (unlikely(page->mapping != mapping)) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos)
v[PGPGIN] /= 2; /* sectors -> kbytes */
v[PGPGOUT] /= 2;
#endif
return m->private + *pos;
return (unsigned long *)m->private + *pos;
}

static void *vmstat_next(struct seq_file *m, void *arg, loff_t *pos)
Expand Down
2 changes: 1 addition & 1 deletion trunk/scripts/kconfig/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ const char *sym_expand_string_value(const char *in)
symval = sym_get_string_value(sym);
}

newlen = strlen(res) + strlen(symval) + strlen(src);
newlen = strlen(res) + strlen(symval) + strlen(src) + 1;
if (newlen > reslen) {
reslen = newlen;
res = realloc(res, reslen);
Expand Down
2 changes: 2 additions & 0 deletions trunk/sound/pci/asihpi/hpi6000.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,8 @@ static short create_adapter_obj(struct hpi_adapter_obj *pao,
control_cache_size, (struct hpi_control_cache_info *)
&phw->control_cache[0]
);
if (!phw->p_cache)
pao->has_control_cache = 0;
} else
pao->has_control_cache = 0;

Expand Down
2 changes: 2 additions & 0 deletions trunk/sound/pci/asihpi/hpi6205.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,8 @@ static u16 create_adapter_obj(struct hpi_adapter_obj *pao,
interface->control_cache.size_in_bytes,
(struct hpi_control_cache_info *)
p_control_cache_virtual);
if (!phw->p_cache)
err = HPI_ERROR_MEMORY_ALLOC;
}
if (!err) {
err = hpios_locked_mem_get_phys_addr(&phw->
Expand Down
12 changes: 9 additions & 3 deletions trunk/sound/pci/asihpi/hpicmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,14 +571,20 @@ struct hpi_control_cache *hpi_alloc_control_cache(const u32
{
struct hpi_control_cache *p_cache =
kmalloc(sizeof(*p_cache), GFP_KERNEL);
if (!p_cache)
return NULL;
p_cache->p_info =
kmalloc(sizeof(*p_cache->p_info) * number_of_controls,
GFP_KERNEL);
if (!p_cache->p_info) {
kfree(p_cache);
return NULL;
}
p_cache->cache_size_in_bytes = size_in_bytes;
p_cache->control_count = number_of_controls;
p_cache->p_cache =
(struct hpi_control_cache_single *)pDSP_control_buffer;
p_cache->init = 0;
p_cache->p_info =
kmalloc(sizeof(*p_cache->p_info) * p_cache->control_count,
GFP_KERNEL);
return p_cache;
}

Expand Down
33 changes: 11 additions & 22 deletions trunk/sound/pci/cs46xx/dsp_spos.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,39 +225,25 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip)
{
struct dsp_spos_instance * ins = kzalloc(sizeof(struct dsp_spos_instance), GFP_KERNEL);

if (ins == NULL)
if (ins == NULL)
return NULL;

/* better to use vmalloc for this big table */
ins->symbol_table.nsymbols = 0;
ins->symbol_table.symbols = vmalloc(sizeof(struct dsp_symbol_entry) *
DSP_MAX_SYMBOLS);
ins->symbol_table.highest_frag_index = 0;

if (ins->symbol_table.symbols == NULL) {
ins->code.data = kmalloc(DSP_CODE_BYTE_SIZE, GFP_KERNEL);
ins->modules = kmalloc(sizeof(struct dsp_module_desc) * DSP_MAX_MODULES, GFP_KERNEL);
if (!ins->symbol_table.symbols || !ins->code.data || !ins->modules) {
cs46xx_dsp_spos_destroy(chip);
goto error;
}

ins->symbol_table.nsymbols = 0;
ins->symbol_table.highest_frag_index = 0;
ins->code.offset = 0;
ins->code.size = 0;
ins->code.data = kmalloc(DSP_CODE_BYTE_SIZE, GFP_KERNEL);

if (ins->code.data == NULL) {
cs46xx_dsp_spos_destroy(chip);
goto error;
}

ins->nscb = 0;
ins->ntask = 0;

ins->nmodules = 0;
ins->modules = kmalloc(sizeof(struct dsp_module_desc) * DSP_MAX_MODULES, GFP_KERNEL);

if (ins->modules == NULL) {
cs46xx_dsp_spos_destroy(chip);
goto error;
}

/* default SPDIF input sample rate
to 48000 khz */
Expand All @@ -271,8 +257,8 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip)

/* set left and right validity bits and
default channel status */
ins->spdif_csuv_default =
ins->spdif_csuv_stream =
ins->spdif_csuv_default =
ins->spdif_csuv_stream =
/* byte 0 */ ((unsigned int)_wrap_all_bits( (SNDRV_PCM_DEFAULT_CON_SPDIF & 0xff)) << 24) |
/* byte 1 */ ((unsigned int)_wrap_all_bits( ((SNDRV_PCM_DEFAULT_CON_SPDIF >> 8) & 0xff)) << 16) |
/* byte 3 */ (unsigned int)_wrap_all_bits( (SNDRV_PCM_DEFAULT_CON_SPDIF >> 24) & 0xff) |
Expand All @@ -281,6 +267,9 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip)
return ins;

error:
kfree(ins->modules);
kfree(ins->code.data);
vfree(ins->symbol_table.symbols);
kfree(ins);
return NULL;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/pci/hda/patch_cirrus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,7 @@ static const char *cs420x_models[CS420X_MODELS] = {

static struct snd_pci_quirk cs420x_cfg_tbl[] = {
SND_PCI_QUIRK(0x10de, 0x0ac0, "MacBookPro 5,3", CS420X_MBP53),
SND_PCI_QUIRK(0x10de, 0x0d94, "MacBookAir 3,1(2)", CS420X_MBP55),
SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55),
SND_PCI_QUIRK(0x10de, 0xcb89, "MacBookPro 7,1", CS420X_MBP55),
SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27),
Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/pci/lx6464es/lx6464es.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ static int lx_pcm_hw_free(struct snd_pcm_substream *substream)
static void lx_trigger_start(struct lx6464es *chip, struct lx_stream *lx_stream)
{
struct snd_pcm_substream *substream = lx_stream->stream;
const int is_capture = lx_stream->is_capture;
const unsigned int is_capture = lx_stream->is_capture;

int err;

Expand Down Expand Up @@ -473,7 +473,7 @@ static void lx_trigger_start(struct lx6464es *chip, struct lx_stream *lx_stream)

static void lx_trigger_stop(struct lx6464es *chip, struct lx_stream *lx_stream)
{
const int is_capture = lx_stream->is_capture;
const unsigned int is_capture = lx_stream->is_capture;
int err;

snd_printd(LXP "stopping: stopping stream\n");
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/pci/lx6464es/lx6464es.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct lx_stream {
snd_pcm_uframes_t frame_pos;
enum lx_stream_status status; /* free, open, running, draining
* pause */
int is_capture:1;
unsigned int is_capture:1;
};


Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/pci/lx6464es/lx_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ static int lx_interrupt_request_new_buffer(struct lx6464es *chip,
struct lx_stream *lx_stream)
{
struct snd_pcm_substream *substream = lx_stream->stream;
int is_capture = lx_stream->is_capture;
const unsigned int is_capture = lx_stream->is_capture;
int err;
unsigned long flags;

Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ config SND_SOC_ALL_CODECS
select SND_SOC_CQ0093VC if MFD_DAVINCI_VOICECODEC
select SND_SOC_CS42L51 if I2C
select SND_SOC_CS4270 if I2C
select SND_SOC_CX20442
select SND_SOC_DA7210 if I2C
select SND_SOC_JZ4740 if SOC_JZ4740
select SND_SOC_JZ4740_CODEC if SOC_JZ4740
select SND_SOC_MAX98088 if I2C
select SND_SOC_MAX9877 if I2C
select SND_SOC_PCM3008
Expand Down
36 changes: 26 additions & 10 deletions trunk/sound/soc/codecs/tlv320dac33.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
(1000000000 / ((rate * 1000) / samples))

#define US_TO_SAMPLES(rate, us) \
(rate / (1000000 / us))
(rate / (1000000 / (us < 1000000 ? us : 1000000)))

#define UTHR_FROM_PERIOD_SIZE(samples, playrate, burstrate) \
((samples * 5000) / ((burstrate * 5000) / (burstrate - playrate)))
Expand Down Expand Up @@ -200,7 +200,7 @@ static int dac33_read(struct snd_soc_codec *codec, unsigned int reg,
u8 *value)
{
struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
int val;
int val, ret = 0;

*value = reg & 0xff;

Expand All @@ -210,6 +210,7 @@ static int dac33_read(struct snd_soc_codec *codec, unsigned int reg,
if (val < 0) {
dev_err(codec->dev, "Read failed (%d)\n", val);
value[0] = dac33_read_reg_cache(codec, reg);
ret = val;
} else {
value[0] = val;
dac33_write_reg_cache(codec, reg, val);
Expand All @@ -218,7 +219,7 @@ static int dac33_read(struct snd_soc_codec *codec, unsigned int reg,
value[0] = dac33_read_reg_cache(codec, reg);
}

return 0;
return ret;
}

static int dac33_write(struct snd_soc_codec *codec, unsigned int reg,
Expand Down Expand Up @@ -329,13 +330,18 @@ static void dac33_init_chip(struct snd_soc_codec *codec)
dac33_read_reg_cache(codec, DAC33_LINER_TO_RLO_VOL));
}

static inline void dac33_read_id(struct snd_soc_codec *codec)
static inline int dac33_read_id(struct snd_soc_codec *codec)
{
int i, ret = 0;
u8 reg;

dac33_read(codec, DAC33_DEVICE_ID_MSB, &reg);
dac33_read(codec, DAC33_DEVICE_ID_LSB, &reg);
dac33_read(codec, DAC33_DEVICE_REV_ID, &reg);
for (i = 0; i < 3; i++) {
ret = dac33_read(codec, DAC33_DEVICE_ID_MSB + i, &reg);
if (ret < 0)
break;
}

return ret;
}

static inline void dac33_soft_power(struct snd_soc_codec *codec, int power)
Expand Down Expand Up @@ -1076,6 +1082,9 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream)
/* Number of samples under i2c latency */
dac33->alarm_threshold = US_TO_SAMPLES(rate,
dac33->mode1_latency);
nsample_limit = DAC33_BUFFER_SIZE_SAMPLES -
dac33->alarm_threshold;

if (dac33->auto_fifo_config) {
if (period_size <= dac33->alarm_threshold)
/*
Expand All @@ -1086,6 +1095,8 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream)
((dac33->alarm_threshold / period_size) +
(dac33->alarm_threshold % period_size ?
1 : 0));
else if (period_size > nsample_limit)
dac33->nsample = nsample_limit;
else
dac33->nsample = period_size;
} else {
Expand All @@ -1097,8 +1108,7 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream)
*/
dac33->nsample_max = substream->runtime->buffer_size -
period_size;
nsample_limit = DAC33_BUFFER_SIZE_SAMPLES -
dac33->alarm_threshold;

if (dac33->nsample_max > nsample_limit)
dac33->nsample_max = nsample_limit;

Expand Down Expand Up @@ -1414,9 +1424,15 @@ static int dac33_soc_probe(struct snd_soc_codec *codec)
dev_err(codec->dev, "Failed to power up codec: %d\n", ret);
goto err_power;
}
dac33_read_id(codec);
ret = dac33_read_id(codec);
dac33_hard_power(codec, 0);

if (ret < 0) {
dev_err(codec->dev, "Failed to read chip ID: %d\n", ret);
ret = -ENODEV;
goto err_power;
}

/* Check if the IRQ number is valid and request it */
if (dac33->irq >= 0) {
ret = request_irq(dac33->irq, dac33_interrupt_handler,
Expand Down
Loading

0 comments on commit ee22e76

Please sign in to comment.