Skip to content

Commit b243e2f

Browse files
committed
Merge pull request #26 from torvalds/master
Sync up with Linus
2 parents e157eed + 4adca1c commit b243e2f

File tree

17 files changed

+143
-110
lines changed

17 files changed

+143
-110
lines changed

arch/x86/boot/compressed/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ suffix-$(CONFIG_KERNEL_LZO) := lzo
9090
suffix-$(CONFIG_KERNEL_LZ4) := lz4
9191

9292
RUN_SIZE = $(shell $(OBJDUMP) -h vmlinux | \
93-
perl $(srctree)/arch/x86/tools/calc_run_size.pl)
93+
$(CONFIG_SHELL) $(srctree)/arch/x86/tools/calc_run_size.sh)
9494
quiet_cmd_mkpiggy = MKPIGGY $@
9595
cmd_mkpiggy = $(obj)/mkpiggy $< $(RUN_SIZE) > $@ || ( rm -f $@ ; false )
9696

arch/x86/tools/calc_run_size.pl

Lines changed: 0 additions & 39 deletions
This file was deleted.

arch/x86/tools/calc_run_size.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/sh
2+
#
3+
# Calculate the amount of space needed to run the kernel, including room for
4+
# the .bss and .brk sections.
5+
#
6+
# Usage:
7+
# objdump -h a.out | sh calc_run_size.sh
8+
9+
NUM='\([0-9a-fA-F]*[ \t]*\)'
10+
OUT=$(sed -n 's/^[ \t0-9]*.b[sr][sk][ \t]*'"$NUM$NUM$NUM$NUM"'.*/\1\4/p')
11+
if [ -z "$OUT" ] ; then
12+
echo "Never found .bss or .brk file offset" >&2
13+
exit 1
14+
fi
15+
16+
OUT=$(echo ${OUT# })
17+
sizeA=$(printf "%d" 0x${OUT%% *})
18+
OUT=${OUT#* }
19+
offsetA=$(printf "%d" 0x${OUT%% *})
20+
OUT=${OUT#* }
21+
sizeB=$(printf "%d" 0x${OUT%% *})
22+
OUT=${OUT#* }
23+
offsetB=$(printf "%d" 0x${OUT%% *})
24+
25+
run_size=$(( $offsetA + $sizeA + $sizeB ))
26+
27+
# BFD linker shows the same file offset in ELF.
28+
if [ "$offsetA" -ne "$offsetB" ] ; then
29+
# Gold linker shows them as consecutive.
30+
endB=$(( $offsetB + $sizeB ))
31+
if [ "$endB" != "$run_size" ] ; then
32+
printf "sizeA: 0x%x\n" $sizeA >&2
33+
printf "offsetA: 0x%x\n" $offsetA >&2
34+
printf "sizeB: 0x%x\n" $sizeB >&2
35+
printf "offsetB: 0x%x\n" $offsetB >&2
36+
echo ".bss and .brk are non-contiguous" >&2
37+
exit 1
38+
fi
39+
fi
40+
41+
printf "%d\n" $run_size
42+
exit 0

drivers/regulator/core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ struct regulator *regulator_get_optional(struct device *dev, const char *id)
14881488
}
14891489
EXPORT_SYMBOL_GPL(regulator_get_optional);
14901490

1491-
/* Locks held by regulator_put() */
1491+
/* regulator_list_mutex lock held by regulator_put() */
14921492
static void _regulator_put(struct regulator *regulator)
14931493
{
14941494
struct regulator_dev *rdev;
@@ -1503,12 +1503,14 @@ static void _regulator_put(struct regulator *regulator)
15031503
/* remove any sysfs entries */
15041504
if (regulator->dev)
15051505
sysfs_remove_link(&rdev->dev.kobj, regulator->supply_name);
1506+
mutex_lock(&rdev->mutex);
15061507
kfree(regulator->supply_name);
15071508
list_del(&regulator->list);
15081509
kfree(regulator);
15091510

15101511
rdev->open_count--;
15111512
rdev->exclusive = 0;
1513+
mutex_unlock(&rdev->mutex);
15121514

15131515
module_put(rdev->owner);
15141516
}

drivers/regulator/s2mps11.c

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,40 @@ static struct regulator_ops s2mps14_reg_ops;
405405
.enable_mask = S2MPS14_ENABLE_MASK \
406406
}
407407

408+
#define regulator_desc_s2mps13_buck7(num, min, step, min_sel) { \
409+
.name = "BUCK"#num, \
410+
.id = S2MPS13_BUCK##num, \
411+
.ops = &s2mps14_reg_ops, \
412+
.type = REGULATOR_VOLTAGE, \
413+
.owner = THIS_MODULE, \
414+
.min_uV = min, \
415+
.uV_step = step, \
416+
.linear_min_sel = min_sel, \
417+
.n_voltages = S2MPS14_BUCK_N_VOLTAGES, \
418+
.ramp_delay = S2MPS13_BUCK_RAMP_DELAY, \
419+
.vsel_reg = S2MPS13_REG_B1OUT + (num) * 2 - 1, \
420+
.vsel_mask = S2MPS14_BUCK_VSEL_MASK, \
421+
.enable_reg = S2MPS13_REG_B1CTRL + (num - 1) * 2, \
422+
.enable_mask = S2MPS14_ENABLE_MASK \
423+
}
424+
425+
#define regulator_desc_s2mps13_buck8_10(num, min, step, min_sel) { \
426+
.name = "BUCK"#num, \
427+
.id = S2MPS13_BUCK##num, \
428+
.ops = &s2mps14_reg_ops, \
429+
.type = REGULATOR_VOLTAGE, \
430+
.owner = THIS_MODULE, \
431+
.min_uV = min, \
432+
.uV_step = step, \
433+
.linear_min_sel = min_sel, \
434+
.n_voltages = S2MPS14_BUCK_N_VOLTAGES, \
435+
.ramp_delay = S2MPS13_BUCK_RAMP_DELAY, \
436+
.vsel_reg = S2MPS13_REG_B1OUT + (num) * 2 - 1, \
437+
.vsel_mask = S2MPS14_BUCK_VSEL_MASK, \
438+
.enable_reg = S2MPS13_REG_B1CTRL + (num) * 2 - 1, \
439+
.enable_mask = S2MPS14_ENABLE_MASK \
440+
}
441+
408442
static const struct regulator_desc s2mps13_regulators[] = {
409443
regulator_desc_s2mps13_ldo(1, MIN_800_MV, STEP_12_5_MV, 0x00),
410444
regulator_desc_s2mps13_ldo(2, MIN_1400_MV, STEP_50_MV, 0x0C),
@@ -452,10 +486,10 @@ static const struct regulator_desc s2mps13_regulators[] = {
452486
regulator_desc_s2mps13_buck(4, MIN_500_MV, STEP_6_25_MV, 0x10),
453487
regulator_desc_s2mps13_buck(5, MIN_500_MV, STEP_6_25_MV, 0x10),
454488
regulator_desc_s2mps13_buck(6, MIN_500_MV, STEP_6_25_MV, 0x10),
455-
regulator_desc_s2mps13_buck(7, MIN_500_MV, STEP_6_25_MV, 0x10),
456-
regulator_desc_s2mps13_buck(8, MIN_1000_MV, STEP_12_5_MV, 0x20),
457-
regulator_desc_s2mps13_buck(9, MIN_1000_MV, STEP_12_5_MV, 0x20),
458-
regulator_desc_s2mps13_buck(10, MIN_500_MV, STEP_6_25_MV, 0x10),
489+
regulator_desc_s2mps13_buck7(7, MIN_500_MV, STEP_6_25_MV, 0x10),
490+
regulator_desc_s2mps13_buck8_10(8, MIN_1000_MV, STEP_12_5_MV, 0x20),
491+
regulator_desc_s2mps13_buck8_10(9, MIN_1000_MV, STEP_12_5_MV, 0x20),
492+
regulator_desc_s2mps13_buck8_10(10, MIN_500_MV, STEP_6_25_MV, 0x10),
459493
};
460494

461495
static int s2mps14_regulator_enable(struct regulator_dev *rdev)

drivers/rtc/rtc-s5m.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,7 @@ static SIMPLE_DEV_PM_OPS(s5m_rtc_pm_ops, s5m_rtc_suspend, s5m_rtc_resume);
832832
static const struct platform_device_id s5m_rtc_id[] = {
833833
{ "s5m-rtc", S5M8767X },
834834
{ "s2mps14-rtc", S2MPS14X },
835+
{ },
835836
};
836837

837838
static struct platform_driver s5m_rtc_driver = {

drivers/spi/spi-dw-mid.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ int dw_spi_mid_init(struct dw_spi *dws)
271271
iounmap(clk_reg);
272272

273273
dws->num_cs = 16;
274-
dws->fifo_len = 40; /* FIFO has 40 words buffer */
275274

276275
#ifdef CONFIG_SPI_DW_MID_DMA
277276
dws->dma_priv = kzalloc(sizeof(struct mid_dma), GFP_KERNEL);

drivers/spi/spi-dw.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -621,13 +621,13 @@ static void spi_hw_init(struct dw_spi *dws)
621621
if (!dws->fifo_len) {
622622
u32 fifo;
623623

624-
for (fifo = 2; fifo <= 257; fifo++) {
624+
for (fifo = 2; fifo <= 256; fifo++) {
625625
dw_writew(dws, DW_SPI_TXFLTR, fifo);
626626
if (fifo != dw_readw(dws, DW_SPI_TXFLTR))
627627
break;
628628
}
629629

630-
dws->fifo_len = (fifo == 257) ? 0 : fifo;
630+
dws->fifo_len = (fifo == 2) ? 0 : fifo - 1;
631631
dw_writew(dws, DW_SPI_TXFLTR, 0);
632632
}
633633
}
@@ -673,7 +673,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
673673
if (dws->dma_ops && dws->dma_ops->dma_init) {
674674
ret = dws->dma_ops->dma_init(dws);
675675
if (ret) {
676-
dev_warn(&master->dev, "DMA init failed\n");
676+
dev_warn(dev, "DMA init failed\n");
677677
dws->dma_inited = 0;
678678
}
679679
}

drivers/spi/spi-pxa2xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,8 @@ static void giveback(struct driver_data *drv_data)
546546
cs_deassert(drv_data);
547547
}
548548

549-
spi_finalize_current_message(drv_data->master);
550549
drv_data->cur_chip = NULL;
550+
spi_finalize_current_message(drv_data->master);
551551
}
552552

553553
static void reset_sccr1(struct driver_data *drv_data)

drivers/spi/spi-sh-msiof.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ struct sh_msiof_spi_priv {
8282
#define MDR1_SYNCMD_LR 0x30000000 /* L/R mode */
8383
#define MDR1_SYNCAC_SHIFT 25 /* Sync Polarity (1 = Active-low) */
8484
#define MDR1_BITLSB_SHIFT 24 /* MSB/LSB First (1 = LSB first) */
85-
#define MDR1_FLD_MASK 0x000000c0 /* Frame Sync Signal Interval (0-3) */
85+
#define MDR1_FLD_MASK 0x0000000c /* Frame Sync Signal Interval (0-3) */
8686
#define MDR1_FLD_SHIFT 2
8787
#define MDR1_XXSTP 0x00000001 /* Transmission/Reception Stop on FIFO */
8888
/* TMDR1 */

0 commit comments

Comments
 (0)