Commit af370743 authored by Stephen Rothwell's avatar Stephen Rothwell

Merge remote-tracking branch 'staging/staging-next'

parents fc9b8139 90c5f2d2
......@@ -104,6 +104,8 @@ source "drivers/staging/pi433/Kconfig"
source "drivers/staging/mt7621-pci/Kconfig"
source "drivers/staging/mt7621-pci-phy/Kconfig"
source "drivers/staging/mt7621-pinctrl/Kconfig"
source "drivers/staging/mt7621-spi/Kconfig"
......
......@@ -42,6 +42,7 @@ obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/
obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
obj-$(CONFIG_PI433) += pi433/
obj-$(CONFIG_SOC_MT7621) += mt7621-pci/
obj-$(CONFIG_SOC_MT7621) += mt7621-pci-phy/
obj-$(CONFIG_SOC_MT7621) += mt7621-pinctrl/
obj-$(CONFIG_SOC_MT7621) += mt7621-spi/
obj-$(CONFIG_SOC_MT7621) += mt7621-dma/
......
......@@ -252,9 +252,9 @@ static int cb_pcimdas_di_insn_bits(struct comedi_device *dev,
}
static int cb_pcimdas_do_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
struct cb_pcimdas_private *devpriv = dev->private;
......
......@@ -61,7 +61,7 @@
#define USBDUXFASTSUB_CPUCS 0xE600
/*
* max lenghth of the transfer-buffer for software upload
* max length of the transfer-buffer for software upload
*/
#define TB_LEN 0x2000
......
......@@ -165,12 +165,6 @@ static int erofs_map_blocks_flatmode(struct inode *inode,
return err;
}
#ifdef CONFIG_EROFS_FS_ZIP
extern int z_erofs_map_blocks_iter(struct inode *,
struct erofs_map_blocks *,
struct page **, int);
#endif
int erofs_map_blocks_iter(struct inode *inode,
struct erofs_map_blocks *map,
struct page **mpage_ret, int flags)
......
......@@ -252,7 +252,7 @@ static inline int erofs_wait_on_workgroup_freezed(struct erofs_workgroup *grp)
}
#endif
static inline bool erofs_workgroup_get(struct erofs_workgroup *grp, int *ocnt)
static inline int erofs_workgroup_get(struct erofs_workgroup *grp, int *ocnt)
{
int o;
......@@ -288,6 +288,8 @@ static inline void erofs_workstation_cleanup_all(struct super_block *sb)
erofs_shrink_workstation(EROFS_SB(sb), ~0UL, true);
}
extern void erofs_workgroup_free_rcu(struct erofs_workgroup *grp);
#ifdef EROFS_FS_HAS_MANAGED_CACHE
extern int erofs_try_to_free_all_cached_pages(struct erofs_sb_info *sbi,
struct erofs_workgroup *egrp);
......@@ -530,6 +532,11 @@ struct erofs_map_blocks_iter {
struct page *mpage;
};
#ifdef CONFIG_EROFS_FS_ZIP
extern int z_erofs_map_blocks_iter(struct inode *,
struct erofs_map_blocks *,
struct page **, int);
#endif
static inline struct page *
erofs_get_inline_page(struct inode *inode,
......
......@@ -589,7 +589,7 @@ static void __z_erofs_vle_work_release(struct z_erofs_vle_workgroup *grp,
erofs_workgroup_put(&grp->obj);
}
void z_erofs_vle_work_release(struct z_erofs_vle_work *work)
static void z_erofs_vle_work_release(struct z_erofs_vle_work *work)
{
struct z_erofs_vle_workgroup *grp =
z_erofs_vle_work_workgroup(work, true);
......
......@@ -13,7 +13,7 @@
#include "unzip_vle.h"
#include <linux/lz4.h>
int z_erofs_unzip_lz4(void *in, void *out, size_t inlen, size_t outlen)
static int z_erofs_unzip_lz4(void *in, void *out, size_t inlen, size_t outlen)
{
int ret = LZ4_decompress_safe_partial(in, out, inlen, outlen, outlen);
......
......@@ -104,8 +104,6 @@ int erofs_register_workgroup(struct super_block *sb,
return err;
}
extern void erofs_workgroup_free_rcu(struct erofs_workgroup *grp);
static void __erofs_workgroup_free(struct erofs_workgroup *grp)
{
atomic_long_dec(&erofs_global_shrink_cnt);
......@@ -131,9 +129,9 @@ static void erofs_workgroup_unfreeze_final(struct erofs_workgroup *grp)
__erofs_workgroup_free(grp);
}
bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
struct erofs_workgroup *grp,
bool cleanup)
static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
struct erofs_workgroup *grp,
bool cleanup)
{
/*
* for managed cache enabled, the refcount of workgroups
......@@ -172,9 +170,9 @@ bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
#else
/* for nocache case, no customized reclaim path at all */
bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
struct erofs_workgroup *grp,
bool cleanup)
static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
struct erofs_workgroup *grp,
bool cleanup)
{
int cnt = atomic_read(&grp->refcount);
......
......@@ -117,10 +117,12 @@ static int init_inode_xattrs(struct inode *inode)
* and need to be handled
*/
struct xattr_iter_handlers {
int (*entry)(struct xattr_iter *, struct erofs_xattr_entry *);
int (*name)(struct xattr_iter *, unsigned int, char *, unsigned int);
int (*alloc_buffer)(struct xattr_iter *, unsigned int);
void (*value)(struct xattr_iter *, unsigned int, char *, unsigned int);
int (*entry)(struct xattr_iter *_it, struct erofs_xattr_entry *entry);
int (*name)(struct xattr_iter *_it, unsigned int processed, char *buf,
unsigned int len);
int (*alloc_buffer)(struct xattr_iter *_it, unsigned int value_sz);
void (*value)(struct xattr_iter *_it, unsigned int processed, char *buf,
unsigned int len);
};
static inline int xattr_iter_fixup(struct xattr_iter *it)
......
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright 2014-2016 Freescale Semiconductor Inc.
* Copyright 2017-2018 NXP
......
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright 2014-2016 Freescale Semiconductor Inc.
* Copyright 2017-2018 NXP
......
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
/*
* DPAA2 Ethernet Switch declarations
*
......
......@@ -821,9 +821,9 @@ static int gdma_dma_probe(struct platform_device *pdev)
return -EINVAL;
data = (struct gdma_data *) match->data;
dma_dev = devm_kzalloc(&pdev->dev, sizeof(*dma_dev) +
(sizeof(struct gdma_dmaengine_chan) * data->chancnt),
GFP_KERNEL);
dma_dev = devm_kzalloc(&pdev->dev,
struct_size(dma_dev, chan, data->chancnt),
GFP_KERNEL);
if (!dma_dev) {
dev_err(&pdev->dev, "alloc dma device failed\n");
return -EINVAL;
......
......@@ -136,8 +136,8 @@
&pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group = "wdt", "rgmii2", "uart3";
ralink,function = "gpio";
groups = "wdt", "rgmii2", "uart3";
function = "gpio";
};
};
};
......@@ -204,82 +204,82 @@
i2c_pins: i2c0 {
i2c0 {
group = "i2c";
groups = "i2c";
function = "i2c";
};
};
spi_pins: spi0 {
spi0 {
group = "spi";
groups = "spi";
function = "spi";
};
};
uart1_pins: uart1 {
uart1 {
group = "uart1";
groups = "uart1";
function = "uart1";
};
};
uart2_pins: uart2 {
uart2 {
group = "uart2";
groups = "uart2";
function = "uart2";
};
};
uart3_pins: uart3 {
uart3 {
group = "uart3";
groups = "uart3";
function = "uart3";
};
};
rgmii1_pins: rgmii1 {
rgmii1 {
group = "rgmii1";
groups = "rgmii1";
function = "rgmii1";
};
};
rgmii2_pins: rgmii2 {
rgmii2 {
group = "rgmii2";
groups = "rgmii2";
function = "rgmii2";
};
};
mdio_pins: mdio0 {
mdio0 {
group = "mdio";
groups = "mdio";
function = "mdio";
};
};
pcie_pins: pcie0 {
pcie0 {
group = "pcie";
groups = "pcie";
function = "pcie rst";
};
};
nand_pins: nand0 {
spi-nand {
group = "spi";
groups = "spi";
function = "nand1";
};
sdhci-nand {
group = "sdhci";
groups = "sdhci";
function = "nand2";
};
};
sdhci_pins: sdhci0 {
sdhci0 {
group = "sdhci";
groups = "sdhci";
function = "sdhci";
};
};
......@@ -424,6 +424,8 @@
reset-names = "pcie0", "pcie1", "pcie2";
clocks = <&clkctrl 24 &clkctrl 25 &clkctrl 26>;
clock-names = "pcie0", "pcie1", "pcie2";
phys = <&pcie0_port>, <&pcie1_port>, <&pcie2_port>;
phy-names = "pcie-phy0", "pcie-phy1", "pcie-phy2";
pcie@0,0 {
reg = <0x0000 0 0 0 0>;
......@@ -449,4 +451,33 @@
bus-range = <0x00 0xff>;
};
};
pcie0_phy: pcie-phy@1a149000 {
compatible = "mediatek,mt7621-pci-phy";
reg = <0x1a149000 0x0700>;
#address-cells = <1>;
#size-cells = <0>;
pcie0_port: pcie-phy@0 {
reg = <0>;
#phy-cells = <0>;
};
pcie1_port: pcie-phy@1 {
reg = <1>;
#phy-cells = <0>;
};
};
pcie1_phy: pcie-phy@1a14a000 {
compatible = "mediatek,mt7621-pci-phy";
reg = <0x1a14a000 0x0700>;
#address-cells = <1>;
#size-cells = <0>;
pcie2_port: pcie-phy@0 {
reg = <0>;
#phy-cells = <0>;
};
};
};
config PCI_MT7621_PHY
tristate "MediaTek MT7621 PCI PHY Driver"
depends on RALINK && OF
select GENERIC_PHY
help
Say 'Y' here to add support for MediaTek MT7621 PCI PHY driver,
obj-$(CONFIG_SOC_MT7621) += pci-mt7621-phy.o
- general code review and cleanup
Cc: NeilBrown <neil@brown.name> and Sergio Paracuellos <sergio.paracuellos@gmail.com>
Mediatek Mt7621 PCIe PHY
Required properties:
- compatible: must be "mediatek,mt7621-pci-phy"
- reg: base address and length of the PCIe PHY block
- #address-cells: must be 1
- #size-cells: must be 0
Each PCIe PHY should be represented by a child node
Required properties For the child node:
- reg: the PHY ID
0 - PCIe RC 0
1 - PCIe RC 1
- #phy-cells: must be 0
Example:
pcie0_phy: pcie-phy@1a149000 {
compatible = "mediatek,mt7621-pci-phy";
reg = <0x1a149000 0x0700>;
#address-cells = <1>;
#size-cells = <0>;
pcie0_port: pcie-phy@0 {
reg = <0>;
#phy-cells = <0>;
};
pcie1_port: pcie-phy@1 {
reg = <1>;
#phy-cells = <0>;
};
};
pcie1_phy: pcie-phy@1a14a000 {
compatible = "mediatek,mt7621-pci-phy";
reg = <0x1a14a000 0x0700>;
#address-cells = <1>;
#size-cells = <0>;
pcie2_port: pcie-phy@0 {
reg = <0>;
#phy-cells = <0>;
};
};
/* users of the PCIe phy */
pcie: pcie@1e140000 {
...
...
phys = <&pcie0_port>, <&pcie1_port>, <&pcie2_port>;
phy-names = "pcie-phy0", "pcie-phy1", "pcie-phy2";
};
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -2,3 +2,4 @@ config PINCTRL_RT2880
bool "RT2800 pinctrl driver for RALINK/Mediatek SOCs"
depends on RALINK
select PINMUX
select GENERIC_PINCONF
......@@ -11,6 +11,7 @@
#include <linux/of.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinconf-generic.h>
#include <linux/pinctrl/pinmux.h>
#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/machine.h>
......@@ -73,48 +74,12 @@ static int rt2880_get_group_pins(struct pinctrl_dev *pctrldev,
return 0;
}
static int rt2880_pinctrl_dt_node_to_map(struct pinctrl_dev *pctrldev,
struct device_node *np_config,
struct pinctrl_map **map,
unsigned int *num_maps)
{
struct rt2880_priv *p = pinctrl_dev_get_drvdata(pctrldev);
struct property *prop;
const char *function_name, *group_name;
int ret;
int ngroups = 0;
unsigned int reserved_maps = 0;
for_each_node_with_property(np_config, "group")
ngroups++;
*map = NULL;
ret = pinctrl_utils_reserve_map(pctrldev, map, &reserved_maps,
num_maps, ngroups);
if (ret) {
dev_err(p->dev, "can't reserve map: %d\n", ret);
return ret;
}
of_property_for_each_string(np_config, "group", prop, group_name) {
ret = pinctrl_utils_add_map_mux(pctrldev, map, &reserved_maps,
num_maps, group_name,
function_name);
if (ret) {
dev_err(p->dev, "can't add map: %d\n", ret);
return ret;
}
}
return 0;
}
static const struct pinctrl_ops rt2880_pctrl_ops = {
.get_groups_count = rt2880_get_group_count,
.get_group_name = rt2880_get_group_name,
.get_group_pins = rt2880_get_group_pins,
.dt_node_to_map = rt2880_pinctrl_dt_node_to_map,
.dt_free_map = pinctrl_utils_free_map,
.dt_node_to_map = pinconf_generic_dt_node_to_map_all,
.dt_free_map = pinconf_generic_dt_free_map,
};
static int rt2880_pmx_func_count(struct pinctrl_dev *pctrldev)
......
......@@ -15,7 +15,7 @@
#include "dot11d.h"
struct channel_list {
u8 Channel[32];
u8 channel[32];
u8 Len;
};
......@@ -66,11 +66,11 @@ void Dot11d_Channelmap(u8 channel_plan, struct rtllib_device *ieee)
memset(GET_DOT11D_INFO(ieee)->channel_map, 0,
sizeof(GET_DOT11D_INFO(ieee)->channel_map));
for (i = 0; i < ChannelPlan[channel_plan].Len; i++) {
if (ChannelPlan[channel_plan].Channel[i] < min_chan ||
ChannelPlan[channel_plan].Channel[i] > max_chan)
if (ChannelPlan[channel_plan].channel[i] < min_chan ||
ChannelPlan[channel_plan].channel[i] > max_chan)
break;
GET_DOT11D_INFO(ieee)->channel_map[ChannelPlan
[channel_plan].Channel[i]] = 1;
[channel_plan].channel[i]] = 1;
}
}
......
......@@ -1049,9 +1049,9 @@ static int _rtl92e_wx_set_promisc_mode(struct net_device *dev,
(bPromiscuousOn) ? (true) : (false);
ieee->IntelPromiscuousModeInfo.bFilterSourceStationFrame =
(bFilterSourceStationFrame) ? (true) : (false);
(bPromiscuousOn) ?
(rtllib_EnableIntelPromiscuousMode(dev, false)) :
(rtllib_DisableIntelPromiscuousMode(dev, false));
(bPromiscuousOn) ?
(rtllib_EnableIntelPromiscuousMode(dev, false)) :
(rtllib_DisableIntelPromiscuousMode(dev, false));
netdev_info(dev,
"=======>%s(), on = %d, filter src sta = %d\n",
......
......@@ -1665,7 +1665,10 @@ static int ms_copy_page(struct rtsx_chip *chip, u16 old_blk, u16 new_blk,
return STATUS_FAIL;
}
ms_read_extra_data(chip, old_blk, i, extra, MS_EXTRA_SIZE);
retval = ms_read_extra_data(chip, old_blk, i, extra,
MS_EXTRA_SIZE);
if (retval != STATUS_SUCCESS)
return STATUS_FAIL;
retval = ms_set_rw_reg_addr(chip, OverwriteFlag,
MS_EXTRA_SIZE, SystemParm, 6);
......
......@@ -4437,7 +4437,12 @@ int sd_execute_write_data(struct scsi_cmnd *srb, struct rtsx_chip *chip)
rtsx_init_cmd(chip);
rtsx_add_cmd(chip, CHECK_REG_CMD, 0xFD30, 0x02, 0x02);
rtsx_send_cmd(chip, SD_CARD, 250);
retval = rtsx_send_cmd(chip, SD_CARD, 250);
if (retval < 0) {
write_err = true;
rtsx_clear_sd_error(chip);
goto sd_execute_write_cmd_failed;
}
retval = sd_update_lock_status(chip);
if (retval != STATUS_SUCCESS) {
......
......@@ -3,7 +3,7 @@ menu "Speakup console speech"
config SPEAKUP
depends on VT
tristate "Speakup core"
---help---
help
This is the Speakup screen reader. Think of it as a
video console for blind people. If built in to the
kernel, it can speak everything on the text console from
......@@ -43,7 +43,7 @@ config SPEAKUP
if SPEAKUP
config SPEAKUP_SYNTH_ACNTSA
tristate "Accent SA synthesizer support"
---help---
help
This is the Speakup driver for the Accent SA
synthesizer. You can say y to build it into the kernel,
or m to build it as a module. See the configuration
......@@ -52,7 +52,7 @@ config SPEAKUP_SYNTH_ACNTSA
config SPEAKUP_SYNTH_ACNTPC
tristate "Accent PC synthesizer support"
depends on ISA || COMPILE_TEST
---help---
help
This is the Speakup driver for the accent pc
synthesizer. You can say y to build it into the kernel,
or m to build it as a module. See the configuration
......@@ -60,7 +60,7 @@ config SPEAKUP_SYNTH_ACNTPC
config SPEAKUP_SYNTH_APOLLO
tristate "Apollo II synthesizer support"
---help---
help
This is the Speakup driver for the Apollo II
synthesizer. You can say y to build it into the kernel,
or m to build it as a module. See the configuration
......@@ -68,7 +68,7 @@ config SPEAKUP_SYNTH_APOLLO
config SPEAKUP_SYNTH_AUDPTR
tristate "Audapter synthesizer support"
---help---
help
This is the Speakup driver for the Audapter synthesizer.
You can say y to build it into the kernel, or m to
build it as a module. See the configuration help on the
......@@ -76,7 +76,7 @@ config SPEAKUP_SYNTH_AUDPTR
config SPEAKUP_SYNTH_BNS
tristate "Braille 'n' Speak synthesizer support"
---help---
help
This is the Speakup driver for the Braille 'n' Speak
synthesizer. You can say y to build it into the kernel,
or m to build it as a module. See the configuration
......@@ -84,7 +84,7 @@ config SPEAKUP_SYNTH_BNS
config SPEAKUP_SYNTH_DECTLK
tristate "DECtalk Express synthesizer support"
---help---
help
This is the Speakup driver for the DecTalk Express
synthesizer. You can say y to build it into the kernel,
......@@ -93,7 +93,7 @@ config SPEAKUP_SYNTH_DECTLK
config SPEAKUP_SYNTH_DECEXT
tristate "DECtalk External (old) synthesizer support"
---help---
help
This is the Speakup driver for the DecTalk External
(old) synthesizer. You can say y to build it into the
......@@ -105,7 +105,7 @@ config SPEAKUP_SYNTH_DECPC
depends on m
depends on ISA || COMPILE_TEST
tristate "DECtalk PC (big ISA card) synthesizer support"
---help---
help
This is the Speakup driver for the DecTalk PC (full
length ISA) synthesizer. You can say m to build it as
......@@ -127,7 +127,7 @@ config SPEAKUP_SYNTH_DECPC
config SPEAKUP_SYNTH_DTLK
tristate "DoubleTalk PC synthesizer support"
depends on ISA || COMPILE_TEST
---help---
help
This is the Speakup driver for the internal DoubleTalk
PC synthesizer. You can say y to build it into the
......@@ -138,7 +138,7 @@ config SPEAKUP_SYNTH_DTLK
config SPEAKUP_SYNTH_KEYPC
tristate "Keynote Gold PC synthesizer support"
depends on ISA || COMPILE_TEST
---help---
help
This is the Speakup driver for the Keynote Gold
PC synthesizer. You can say y to build it into the
......@@ -148,7 +148,7 @@ config SPEAKUP_SYNTH_KEYPC
config SPEAKUP_SYNTH_LTLK
tristate "DoubleTalk LT/LiteTalk synthesizer support"
---help---
help
This is the Speakup driver for the LiteTalk/DoubleTalk
LT synthesizer. You can say y to build it into the
......@@ -158,7 +158,7 @@ config SPEAKUP_SYNTH_LTLK
config SPEAKUP_SYNTH_SOFT
tristate "Userspace software synthesizer support"
---help---
help
This is the software synthesizer device node. It will
register a device /dev/softsynth which midware programs
......@@ -169,7 +169,7 @@ config SPEAKUP_SYNTH_SOFT
config SPEAKUP_SYNTH_SPKOUT
tristate "Speak Out synthesizer support"
---help---
help
This is the Speakup driver for the Speakout synthesizer.
You can say y to build it into the kernel, or m to
......@@ -178,7 +178,7 @@ config SPEAKUP_SYNTH_SPKOUT
config SPEAKUP_SYNTH_TXPRT
tristate "Transport synthesizer support"
---help---
help
This is the Speakup driver for the Transport
synthesizer. You can say y to build it into the kernel,
......@@ -187,7 +187,7 @@ config SPEAKUP_SYNTH_TXPRT
config SPEAKUP_SYNTH_DUMMY
tristate "Dummy synthesizer driver (for testing)"
---help---
help
This is a dummy Speakup driver for plugging a mere serial
terminal. This is handy if you want to test speakup but
......
......@@ -1991,7 +1991,7 @@ int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level)
return result;
}
int wilc_get_stats_async(struct wilc_vif *vif, struct rf_info *stats)
static int wilc_get_stats_async(struct wilc_vif *vif, struct rf_info *stats)
{
int result;
struct host_if_msg *msg;
......
......@@ -556,10 +556,9 @@ static int mkimage(struct imgchunk *clist, unsigned int *ccnt)
/* Allocate buffer space for chunks */
for (i = 0; i < *ccnt; i++) {
clist[i].data = kzalloc(clist[i].len, GFP_KERNEL);
if (!clist[i].data) {
pr_err("failed to allocate image space, exiting.\n");
if (!clist[i].data)
return 1;
}
pr_debug("chunk[%d]: addr=0x%06x len=%d\n",
i, clist[i].addr, clist[i].len);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment