Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
Merge branch 'android-3.18' of https://android.googlesource.com/kerne…
Browse files Browse the repository at this point in the history
…l/common into android10

* 'android-3.18' of https://android.googlesource.com/kernel/common: (21 commits)
  hfs: fix return value of hfs_get_block()
  hfsplus: fix return value of hfsplus_get_block()
  hfs: prevent btree data loss on ENOSPC
  hfsplus: prevent btree data loss on ENOSPC
  hfs: fix BUG on bnode parent update
  hfsplus: fix BUG on bnode parent update
  linux/bitmap.h: handle constant zero-size bitmaps correctly
  mm/page-writeback.c: fix range_cyclic writeback vs writepages deadlock
  fs/ocfs2/dlm/dlmdebug.c: fix a sleep-in-atomic-context bug in dlm_print_one_mle()
  thermal: rcar_thermal: Prevent hardware access during system suspend
  mfd: max8997: Enale irq-wakeup unconditionally
  mfd: mc13xxx-core: Fix PMIC shutdown when reading ADC values
  qlcnic: fix a return in qlcnic_dcb_get_capability()
  mISDN: Fix type of switch control variable in ctrl_teimanager
  rtc: s35390a: Change buf's type to u8 in s35390a_init
  ceph: fix dentry leak in ceph_readdir_prepopulate
  spi: omap2-mcspi: Set FIFO DMA trigger level to word length
  atm: zatm: Fix empty body Clang warnings
  USB: misc: appledisplay: fix backlight update_status return code
  ALSA: i2c/cs8427: Fix int to char conversion
  ...
  • Loading branch information
Yasir-siddiqui committed Jan 14, 2020
2 parents b3e8c16 + 33196e8 commit ae395f4
Show file tree
Hide file tree
Showing 29 changed files with 207 additions and 115 deletions.
42 changes: 21 additions & 21 deletions drivers/atm/zatm.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static unsigned long dummy[2] = {0,0};
#define zin_n(r) inl(zatm_dev->base+r*4)
#define zin(r) inl(zatm_dev->base+uPD98401_##r*4)
#define zout(v,r) outl(v,zatm_dev->base+uPD98401_##r*4)
#define zwait while (zin(CMR) & uPD98401_BUSY)
#define zwait() do {} while (zin(CMR) & uPD98401_BUSY)

/* RX0, RX1, TX0, TX1 */
static const int mbx_entries[NR_MBX] = { 1024,1024,1024,1024 };
Expand All @@ -139,7 +139,7 @@ static const int mbx_esize[NR_MBX] = { 16,16,4,4 }; /* entry size in bytes */

static void zpokel(struct zatm_dev *zatm_dev,u32 value,u32 addr)
{
zwait;
zwait();
zout(value,CER);
zout(uPD98401_IND_ACC | uPD98401_IA_BALL |
(uPD98401_IA_TGT_CM << uPD98401_IA_TGT_SHIFT) | addr,CMR);
Expand All @@ -148,10 +148,10 @@ static void zpokel(struct zatm_dev *zatm_dev,u32 value,u32 addr)

static u32 zpeekl(struct zatm_dev *zatm_dev,u32 addr)
{
zwait;
zwait();
zout(uPD98401_IND_ACC | uPD98401_IA_BALL | uPD98401_IA_RW |
(uPD98401_IA_TGT_CM << uPD98401_IA_TGT_SHIFT) | addr,CMR);
zwait;
zwait();
return zin(CER);
}

Expand Down Expand Up @@ -240,7 +240,7 @@ static void refill_pool(struct atm_dev *dev,int pool)
}
if (first) {
spin_lock_irqsave(&zatm_dev->lock, flags);
zwait;
zwait();
zout(virt_to_bus(first),CER);
zout(uPD98401_ADD_BAT | (pool << uPD98401_POOL_SHIFT) | count,
CMR);
Expand Down Expand Up @@ -507,9 +507,9 @@ static int open_rx_first(struct atm_vcc *vcc)
}
if (zatm_vcc->pool < 0) return -EMSGSIZE;
spin_lock_irqsave(&zatm_dev->lock, flags);
zwait;
zwait();
zout(uPD98401_OPEN_CHAN,CMR);
zwait;
zwait();
DPRINTK("0x%x 0x%x\n",zin(CMR),zin(CER));
chan = (zin(CMR) & uPD98401_CHAN_ADDR) >> uPD98401_CHAN_ADDR_SHIFT;
spin_unlock_irqrestore(&zatm_dev->lock, flags);
Expand Down Expand Up @@ -570,21 +570,21 @@ static void close_rx(struct atm_vcc *vcc)
pos = vcc->vci >> 1;
shift = (1-(vcc->vci & 1)) << 4;
zpokel(zatm_dev,zpeekl(zatm_dev,pos) & ~(0xffff << shift),pos);
zwait;
zwait();
zout(uPD98401_NOP,CMR);
zwait;
zwait();
zout(uPD98401_NOP,CMR);
spin_unlock_irqrestore(&zatm_dev->lock, flags);
}
spin_lock_irqsave(&zatm_dev->lock, flags);
zwait;
zwait();
zout(uPD98401_DEACT_CHAN | uPD98401_CHAN_RT | (zatm_vcc->rx_chan <<
uPD98401_CHAN_ADDR_SHIFT),CMR);
zwait;
zwait();
udelay(10); /* why oh why ... ? */
zout(uPD98401_CLOSE_CHAN | uPD98401_CHAN_RT | (zatm_vcc->rx_chan <<
uPD98401_CHAN_ADDR_SHIFT),CMR);
zwait;
zwait();
if (!(zin(CMR) & uPD98401_CHAN_ADDR))
printk(KERN_CRIT DEV_LABEL "(itf %d): can't close RX channel "
"%d\n",vcc->dev->number,zatm_vcc->rx_chan);
Expand Down Expand Up @@ -697,7 +697,7 @@ printk("NONONONOO!!!!\n");
skb_queue_tail(&zatm_vcc->tx_queue,skb);
DPRINTK("QRP=0x%08lx\n",zpeekl(zatm_dev,zatm_vcc->tx_chan*VC_SIZE/4+
uPD98401_TXVC_QRP));
zwait;
zwait();
zout(uPD98401_TX_READY | (zatm_vcc->tx_chan <<
uPD98401_CHAN_ADDR_SHIFT),CMR);
spin_unlock_irqrestore(&zatm_dev->lock, flags);
Expand Down Expand Up @@ -889,12 +889,12 @@ static void close_tx(struct atm_vcc *vcc)
}
spin_lock_irqsave(&zatm_dev->lock, flags);
#if 0
zwait;
zwait();
zout(uPD98401_DEACT_CHAN | (chan << uPD98401_CHAN_ADDR_SHIFT),CMR);
#endif
zwait;
zwait();
zout(uPD98401_CLOSE_CHAN | (chan << uPD98401_CHAN_ADDR_SHIFT),CMR);
zwait;
zwait();
if (!(zin(CMR) & uPD98401_CHAN_ADDR))
printk(KERN_CRIT DEV_LABEL "(itf %d): can't close TX channel "
"%d\n",vcc->dev->number,chan);
Expand Down Expand Up @@ -924,9 +924,9 @@ static int open_tx_first(struct atm_vcc *vcc)
zatm_vcc->tx_chan = 0;
if (vcc->qos.txtp.traffic_class == ATM_NONE) return 0;
spin_lock_irqsave(&zatm_dev->lock, flags);
zwait;
zwait();
zout(uPD98401_OPEN_CHAN,CMR);
zwait;
zwait();
DPRINTK("0x%x 0x%x\n",zin(CMR),zin(CER));
chan = (zin(CMR) & uPD98401_CHAN_ADDR) >> uPD98401_CHAN_ADDR_SHIFT;
spin_unlock_irqrestore(&zatm_dev->lock, flags);
Expand Down Expand Up @@ -1551,7 +1551,7 @@ static void zatm_phy_put(struct atm_dev *dev,unsigned char value,
struct zatm_dev *zatm_dev;

zatm_dev = ZATM_DEV(dev);
zwait;
zwait();
zout(value,CER);
zout(uPD98401_IND_ACC | uPD98401_IA_B0 |
(uPD98401_IA_TGT_PHY << uPD98401_IA_TGT_SHIFT) | addr,CMR);
Expand All @@ -1563,10 +1563,10 @@ static unsigned char zatm_phy_get(struct atm_dev *dev,unsigned long addr)
struct zatm_dev *zatm_dev;

zatm_dev = ZATM_DEV(dev);
zwait;
zwait();
zout(uPD98401_IND_ACC | uPD98401_IA_B0 | uPD98401_IA_RW |
(uPD98401_IA_TGT_PHY << uPD98401_IA_TGT_SHIFT) | addr,CMR);
zwait;
zwait();
return zin(CER) & 0xff;
}

Expand Down
7 changes: 3 additions & 4 deletions drivers/isdn/mISDN/tei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,8 +1180,7 @@ static int
ctrl_teimanager(struct manager *mgr, void *arg)
{
/* currently we only have one option */
int *val = (int *)arg;
int ret = 0;
unsigned int *val = (unsigned int *)arg;

switch (val[0]) {
case IMCLEAR_L2:
Expand All @@ -1197,9 +1196,9 @@ ctrl_teimanager(struct manager *mgr, void *arg)
test_and_clear_bit(OPTION_L1_HOLD, &mgr->options);
break;
default:
ret = -EINVAL;
return -EINVAL;
}
return ret;
return 0;
}

/* This function does create a L2 for fixed TEI in NT Mode */
Expand Down
8 changes: 1 addition & 7 deletions drivers/mfd/max8997.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,6 @@ static struct max8997_platform_data *max8997_i2c_parse_dt_pdata(

pd->ono = irq_of_parse_and_map(dev->of_node, 1);

/*
* ToDo: the 'wakeup' member in the platform data is more of a linux
* specfic information. Hence, there is no binding for that yet and
* not parsed here.
*/

return pd;
}

Expand Down Expand Up @@ -248,7 +242,7 @@ static int max8997_i2c_probe(struct i2c_client *i2c,
*/

/* MAX8997 has a power button input. */
device_init_wakeup(max8997->dev, pdata->wakeup);
device_init_wakeup(max8997->dev, true);

return ret;

Expand Down
3 changes: 2 additions & 1 deletion drivers/mfd/mc13xxx-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, unsigned int mode,
if (ret)
goto out;

adc0 = MC13XXX_ADC0_ADINC1 | MC13XXX_ADC0_ADINC2;
adc0 = MC13XXX_ADC0_ADINC1 | MC13XXX_ADC0_ADINC2 |
MC13XXX_ADC0_CHRGRAWDIV;
adc1 = MC13XXX_ADC1_ADEN | MC13XXX_ADC1_ADTRIGIGN | MC13XXX_ADC1_ASC;

if (channel > 7)
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ static u8 qlcnic_dcb_get_capability(struct net_device *netdev, int capid,
struct qlcnic_adapter *adapter = netdev_priv(netdev);

if (!test_bit(QLCNIC_DCB_STATE, &adapter->dcb->state))
return 0;
return 1;

switch (capid) {
case DCB_CAP_ATTR_PG:
Expand Down
17 changes: 17 additions & 0 deletions drivers/regulator/ab8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,23 @@ static struct ab8500_regulator_info
.update_val_idle = 0x82,
.update_val_normal = 0x02,
},
[AB8505_LDO_USB] = {
.desc = {
.name = "LDO-USB",
.ops = &ab8500_regulator_mode_ops,
.type = REGULATOR_VOLTAGE,
.id = AB8505_LDO_USB,
.owner = THIS_MODULE,
.n_voltages = 1,
.volt_table = fixed_3300000_voltage,
},
.update_bank = 0x03,
.update_reg = 0x82,
.update_mask = 0x03,
.update_val = 0x01,
.update_val_idle = 0x03,
.update_val_normal = 0x01,
},
[AB8505_LDO_AUDIO] = {
.desc = {
.name = "LDO-AUDIO",
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-s35390a.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static int s35390a_get_reg(struct s35390a *s35390a, int reg, char *buf, int len)
*/
static int s35390a_reset(struct s35390a *s35390a, char *status1)
{
char buf;
u8 buf;
int ret;
unsigned initcount = 0;

Expand Down
26 changes: 7 additions & 19 deletions drivers/spi/spi-omap2-mcspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ static void omap2_mcspi_set_fifo(const struct spi_device *spi,
struct omap2_mcspi_cs *cs = spi->controller_state;
struct omap2_mcspi *mcspi;
unsigned int wcnt;
int max_fifo_depth, fifo_depth, bytes_per_word;
int max_fifo_depth, bytes_per_word;
u32 chconf, xferlevel;

mcspi = spi_master_get_devdata(master);
Expand All @@ -301,27 +301,24 @@ static void omap2_mcspi_set_fifo(const struct spi_device *spi,
else
max_fifo_depth = OMAP2_MCSPI_MAX_FIFODEPTH;

fifo_depth = gcd(t->len, max_fifo_depth);
if (fifo_depth < 2 || fifo_depth % bytes_per_word != 0)
goto disable_fifo;

wcnt = t->len / bytes_per_word;
if (wcnt > OMAP2_MCSPI_MAX_FIFOWCNT)
goto disable_fifo;

xferlevel = wcnt << 16;
if (t->rx_buf != NULL) {
chconf |= OMAP2_MCSPI_CHCONF_FFER;
xferlevel |= (fifo_depth - 1) << 8;
xferlevel |= (bytes_per_word - 1) << 8;
}

if (t->tx_buf != NULL) {
chconf |= OMAP2_MCSPI_CHCONF_FFET;
xferlevel |= fifo_depth - 1;
xferlevel |= bytes_per_word - 1;
}

mcspi_write_reg(master, OMAP2_MCSPI_XFERLEVEL, xferlevel);
mcspi_write_chconf0(spi, chconf);
mcspi->fifo_depth = fifo_depth;
mcspi->fifo_depth = max_fifo_depth;

return;
}
Expand Down Expand Up @@ -553,7 +550,6 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer)
struct dma_slave_config cfg;
enum dma_slave_buswidth width;
unsigned es;
u32 burst;
void __iomem *chstat_reg;
void __iomem *irqstat_reg;
int wait_res;
Expand All @@ -575,22 +571,14 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer)
}

count = xfer->len;
burst = 1;

if (mcspi->fifo_depth > 0) {
if (count > mcspi->fifo_depth)
burst = mcspi->fifo_depth / es;
else
burst = count / es;
}

memset(&cfg, 0, sizeof(cfg));
cfg.src_addr = cs->phys + OMAP2_MCSPI_RX0;
cfg.dst_addr = cs->phys + OMAP2_MCSPI_TX0;
cfg.src_addr_width = width;
cfg.dst_addr_width = width;
cfg.src_maxburst = burst;
cfg.dst_maxburst = burst;
cfg.src_maxburst = es;
cfg.dst_maxburst = es;

rx = xfer->rx_buf;
tx = xfer->tx_buf;
Expand Down
4 changes: 2 additions & 2 deletions drivers/thermal/rcar_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ static irqreturn_t rcar_thermal_irq(int irq, void *data)
rcar_thermal_for_each_priv(priv, common) {
if (rcar_thermal_had_changed(priv, status)) {
rcar_thermal_irq_disable(priv);
schedule_delayed_work(&priv->work,
msecs_to_jiffies(300));
queue_delayed_work(system_freezable_wq, &priv->work,
msecs_to_jiffies(300));
}
}

Expand Down
7 changes: 5 additions & 2 deletions drivers/usb/misc/appledisplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,11 @@ static int appledisplay_bl_update_status(struct backlight_device *bd)
pdata->msgdata, 2,
ACD_USB_TIMEOUT);
mutex_unlock(&pdata->sysfslock);

return retval;

if (retval < 0)
return retval;
else
return 0;
}

static int appledisplay_bl_get_brightness(struct backlight_device *bd)
Expand Down
1 change: 0 additions & 1 deletion fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,6 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req,
dn = splice_dentry(dn, in, NULL);
if (IS_ERR(dn)) {
err = PTR_ERR(dn);
dn = NULL;
goto next_item;
}
}
Expand Down
1 change: 1 addition & 0 deletions fs/hfs/brec.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ static int hfs_brec_update_parent(struct hfs_find_data *fd)
/* restore search_key */
hfs_bnode_read_key(node, fd->search_key, 14);
}
new_node = NULL;
}

if (!rec && node->parent)
Expand Down
Loading

0 comments on commit ae395f4

Please sign in to comment.