Skip to content

Commit 5cd4dc4

Browse files
committed
Merge tag 'staging-5.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver updates from Greg KH: "Here is the big set of staging driver updates and cleanups for 5.16-rc1. Overall we ended up removing a lot of code this time, a bit over 20,000 lines are now gone thanks to a lot of cleanup work by many developers. Nothing huge in here functionality wise, just loads of cleanups: - r8188eu driver major cleanups and removal of unused and dead code - wlan-ng minor cleanups - fbtft driver cleanups - most driver cleanups - rtl8* drivers cleanups - rts5208 driver cleanups - vt6655 driver cleanups - vc04_services drivers cleanups - wfx cleanups on the way to almost getting this merged out of staging (it's close!) - tiny mips changes needed for the mt7621 drivers, they have been acked by the respective subsystem maintainers to go through this tree. All of these have been in linux-next for a while with no reported issues" * tag 'staging-5.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (622 commits) staging: r8188eu: hal: remove goto statement and local variable staging: rtl8723bs: hal remove the assignment to itself staging: rtl8723bs: fix unmet dependency on CRYPTO for CRYPTO_LIB_ARC4 staging: vchiq_core: get rid of typedef staging: fieldbus: anybus: reframe comment to avoid warning staging: r8188eu: fix missing unlock in rtw_resume() staging: r8188eu: core: remove the goto from rtw_IOL_accquire_xmit_frame staging: r8188eu: core: remove goto statement staging: vt6655: Rename `dwAL7230InitTable` array staging: vt6655: Rename `dwAL2230PowerTable` array staging: vt6655: Rename `dwAL7230InitTableAMode` array staging: vt6655: Rename `dwAL7230ChannelTable2` array staging: vt6655: Rename `dwAL7230ChannelTable1` array staging: vt6655: Rename `dwAL7230ChannelTable0` array staging: vt6655: Rename `dwAL2230ChannelTable1` array staging: vt6655: Rename `dwAL2230ChannelTable0` array staging: r8712u: fix control-message timeout staging: rtl8192u: fix control-message timeouts staging: mt7621-dts: add missing SPDX license to files staging: vchiq_core: fix quoted strings split across lines ...
2 parents 048ff86 + 10508ae commit 5cd4dc4

258 files changed

Lines changed: 3323 additions & 22353 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

arch/mips/include/asm/mach-ralink/spaces.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#ifndef __ASM_MACH_RALINK_SPACES_H_
33
#define __ASM_MACH_RALINK_SPACES_H_
44

5-
#define PCI_IOBASE _AC(0xa0000000, UL)
6-
#define PCI_IOSIZE SZ_16M
5+
#define PCI_IOBASE mips_io_port_base
6+
#define PCI_IOSIZE SZ_64K
77
#define IO_SPACE_LIMIT (PCI_IOSIZE - 1)
88

99
#include <asm/mach-generic/spaces.h>

arch/mips/include/asm/pci.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
#include <linux/list.h>
2121
#include <linux/of.h>
2222

23+
#ifdef CONFIG_PCI_DRIVERS_GENERIC
24+
#define pci_remap_iospace pci_remap_iospace
25+
#endif
26+
2327
#ifdef CONFIG_PCI_DRIVERS_LEGACY
2428

2529
/*

arch/mips/pci/pci-generic.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,17 @@ void pcibios_fixup_bus(struct pci_bus *bus)
4646
{
4747
pci_read_bridge_bases(bus);
4848
}
49+
50+
int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr)
51+
{
52+
unsigned long vaddr;
53+
54+
if (res->start != 0) {
55+
WARN_ONCE(1, "resource start address is not zero\n");
56+
return -ENODEV;
57+
}
58+
59+
vaddr = (unsigned long)ioremap(phys_addr, resource_size(res));
60+
set_io_port_base(vaddr);
61+
return 0;
62+
}

drivers/pci/pci.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4101,6 +4101,7 @@ unsigned long __weak pci_address_to_pio(phys_addr_t address)
41014101
* architectures that have memory mapped IO functions defined (and the
41024102
* PCI_IOBASE value defined) should call this function.
41034103
*/
4104+
#ifndef pci_remap_iospace
41044105
int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr)
41054106
{
41064107
#if defined(PCI_IOBASE) && defined(CONFIG_MMU)
@@ -4124,6 +4125,7 @@ int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr)
41244125
#endif
41254126
}
41264127
EXPORT_SYMBOL(pci_remap_iospace);
4128+
#endif
41274129

41284130
/**
41294131
* pci_unmap_iospace - Unmap the memory mapped I/O space

drivers/staging/axis-fifo/axis-fifo.c

Lines changed: 26 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <linux/types.h>
3131
#include <linux/uaccess.h>
3232
#include <linux/jiffies.h>
33+
#include <linux/miscdevice.h>
3334

3435
#include <linux/of_address.h>
3536
#include <linux/of_device.h>
@@ -102,9 +103,6 @@
102103
* globals
103104
* ----------------------------
104105
*/
105-
106-
static struct class *axis_fifo_driver_class; /* char device class */
107-
108106
static int read_timeout = 1000; /* ms to wait before read() times out */
109107
static int write_timeout = 1000; /* ms to wait before write() times out */
110108

@@ -140,9 +138,7 @@ struct axis_fifo {
140138
unsigned int read_flags; /* read file flags */
141139

142140
struct device *dt_device; /* device created from the device tree */
143-
struct device *device; /* device associated with char_device */
144-
dev_t devt; /* our char device number */
145-
struct cdev char_device; /* our char device */
141+
struct miscdevice miscdev;
146142
};
147143

148144
/* ----------------------------
@@ -319,6 +315,11 @@ static const struct attribute_group axis_fifo_attrs_group = {
319315
.attrs = axis_fifo_attrs,
320316
};
321317

318+
static const struct attribute_group *axis_fifo_attrs_groups[] = {
319+
&axis_fifo_attrs_group,
320+
NULL,
321+
};
322+
322323
/* ----------------------------
323324
* implementation
324325
* ----------------------------
@@ -684,8 +685,8 @@ static irqreturn_t axis_fifo_irq(int irq, void *dw)
684685

685686
static int axis_fifo_open(struct inode *inod, struct file *f)
686687
{
687-
struct axis_fifo *fifo = (struct axis_fifo *)container_of(inod->i_cdev,
688-
struct axis_fifo, char_device);
688+
struct axis_fifo *fifo = container_of(f->private_data,
689+
struct axis_fifo, miscdev);
689690
f->private_data = fifo;
690691

691692
if (((f->f_flags & O_ACCMODE) == O_WRONLY) ||
@@ -812,18 +813,20 @@ static int axis_fifo_probe(struct platform_device *pdev)
812813
struct resource *r_mem; /* IO mem resources */
813814
struct device *dev = &pdev->dev; /* OS device (from device tree) */
814815
struct axis_fifo *fifo = NULL;
815-
816-
char device_name[32];
817-
816+
char *device_name;
818817
int rc = 0; /* error return value */
819818

820819
/* ----------------------------
821820
* init wrapper device
822821
* ----------------------------
823822
*/
824823

824+
device_name = devm_kzalloc(dev, 32, GFP_KERNEL);
825+
if (!device_name)
826+
return -ENOMEM;
827+
825828
/* allocate device wrapper memory */
826-
fifo = devm_kmalloc(dev, sizeof(*fifo), GFP_KERNEL);
829+
fifo = devm_kzalloc(dev, sizeof(*fifo), GFP_KERNEL);
827830
if (!fifo)
828831
return -ENOMEM;
829832

@@ -859,9 +862,7 @@ static int axis_fifo_probe(struct platform_device *pdev)
859862
dev_dbg(fifo->dt_device, "remapped memory to 0x%p\n", fifo->base_addr);
860863

861864
/* create unique device name */
862-
snprintf(device_name, sizeof(device_name), "%s_%pa",
863-
DRIVER_NAME, &r_mem->start);
864-
865+
snprintf(device_name, 32, "%s_%pa", DRIVER_NAME, &r_mem->start);
865866
dev_dbg(fifo->dt_device, "device name [%s]\n", device_name);
866867

867868
/* ----------------------------
@@ -904,51 +905,21 @@ static int axis_fifo_probe(struct platform_device *pdev)
904905
* ----------------------------
905906
*/
906907

907-
/* allocate device number */
908-
rc = alloc_chrdev_region(&fifo->devt, 0, 1, DRIVER_NAME);
908+
/* create character device */
909+
fifo->miscdev.fops = &fops;
910+
fifo->miscdev.minor = MISC_DYNAMIC_MINOR;
911+
fifo->miscdev.name = device_name;
912+
fifo->miscdev.groups = axis_fifo_attrs_groups;
913+
fifo->miscdev.parent = dev;
914+
rc = misc_register(&fifo->miscdev);
909915
if (rc < 0)
910916
goto err_initial;
911-
dev_dbg(fifo->dt_device, "allocated device number major %i minor %i\n",
912-
MAJOR(fifo->devt), MINOR(fifo->devt));
913-
914-
/* create driver file */
915-
fifo->device = device_create(axis_fifo_driver_class, NULL, fifo->devt,
916-
NULL, device_name);
917-
if (IS_ERR(fifo->device)) {
918-
dev_err(fifo->dt_device,
919-
"couldn't create driver file\n");
920-
rc = PTR_ERR(fifo->device);
921-
goto err_chrdev_region;
922-
}
923-
dev_set_drvdata(fifo->device, fifo);
924-
925-
/* create character device */
926-
cdev_init(&fifo->char_device, &fops);
927-
rc = cdev_add(&fifo->char_device, fifo->devt, 1);
928-
if (rc < 0) {
929-
dev_err(fifo->dt_device, "couldn't create character device\n");
930-
goto err_dev;
931-
}
932-
933-
/* create sysfs entries */
934-
rc = devm_device_add_group(fifo->device, &axis_fifo_attrs_group);
935-
if (rc < 0) {
936-
dev_err(fifo->dt_device, "couldn't register sysfs group\n");
937-
goto err_cdev;
938-
}
939917

940-
dev_info(fifo->dt_device, "axis-fifo created at %pa mapped to 0x%pa, irq=%i, major=%i, minor=%i\n",
941-
&r_mem->start, &fifo->base_addr, fifo->irq,
942-
MAJOR(fifo->devt), MINOR(fifo->devt));
918+
dev_info(fifo->dt_device, "axis-fifo created at %pa mapped to 0x%pa, irq=%i\n",
919+
&r_mem->start, &fifo->base_addr, fifo->irq);
943920

944921
return 0;
945922

946-
err_cdev:
947-
cdev_del(&fifo->char_device);
948-
err_dev:
949-
device_destroy(axis_fifo_driver_class, fifo->devt);
950-
err_chrdev_region:
951-
unregister_chrdev_region(fifo->devt, 1);
952923
err_initial:
953924
dev_set_drvdata(dev, NULL);
954925
return rc;
@@ -959,10 +930,7 @@ static int axis_fifo_remove(struct platform_device *pdev)
959930
struct device *dev = &pdev->dev;
960931
struct axis_fifo *fifo = dev_get_drvdata(dev);
961932

962-
cdev_del(&fifo->char_device);
963-
dev_set_drvdata(fifo->device, NULL);
964-
device_destroy(axis_fifo_driver_class, fifo->devt);
965-
unregister_chrdev_region(fifo->devt, 1);
933+
misc_deregister(&fifo->miscdev);
966934
dev_set_drvdata(dev, NULL);
967935

968936
return 0;
@@ -987,9 +955,6 @@ static int __init axis_fifo_init(void)
987955
{
988956
pr_info("axis-fifo driver loaded with parameters read_timeout = %i, write_timeout = %i\n",
989957
read_timeout, write_timeout);
990-
axis_fifo_driver_class = class_create(THIS_MODULE, DRIVER_NAME);
991-
if (IS_ERR(axis_fifo_driver_class))
992-
return PTR_ERR(axis_fifo_driver_class);
993958
return platform_driver_register(&axis_fifo_driver);
994959
}
995960

@@ -998,7 +963,6 @@ module_init(axis_fifo_init);
998963
static void __exit axis_fifo_exit(void)
999964
{
1000965
platform_driver_unregister(&axis_fifo_driver);
1001-
class_destroy(axis_fifo_driver_class);
1002966
}
1003967

1004968
module_exit(axis_fifo_exit);

drivers/staging/fbtft/fbtft-core.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,8 @@ int fbtft_init_display(struct fbtft_par *par)
10381038
i++;
10391039

10401040
/* make debug message */
1041-
for (j = 0; par->init_sequence[i + 1 + j] >= 0; j++);
1041+
for (j = 0; par->init_sequence[i + 1 + j] >= 0; j++)
1042+
;
10421043

10431044
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par,
10441045
"init: write(0x%02X) %*ph\n",
@@ -1318,23 +1319,17 @@ EXPORT_SYMBOL(fbtft_probe_common);
13181319
* @info: Framebuffer
13191320
*
13201321
* Unregisters and releases the framebuffer
1321-
*
1322-
* Return: 0 if successful, negative if error
13231322
*/
1324-
int fbtft_remove_common(struct device *dev, struct fb_info *info)
1323+
void fbtft_remove_common(struct device *dev, struct fb_info *info)
13251324
{
13261325
struct fbtft_par *par;
13271326

1328-
if (!info)
1329-
return -EINVAL;
13301327
par = info->par;
13311328
if (par)
13321329
fbtft_par_dbg(DEBUG_DRIVER_INIT_FUNCTIONS, par,
13331330
"%s()\n", __func__);
13341331
fbtft_unregister_framebuffer(info);
13351332
fbtft_framebuffer_release(info);
1336-
1337-
return 0;
13381333
}
13391334
EXPORT_SYMBOL(fbtft_remove_common);
13401335

drivers/staging/fbtft/fbtft.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ void fbtft_unregister_backlight(struct fbtft_par *par);
252252
int fbtft_init_display(struct fbtft_par *par);
253253
int fbtft_probe_common(struct fbtft_display *display, struct spi_device *sdev,
254254
struct platform_device *pdev);
255-
int fbtft_remove_common(struct device *dev, struct fb_info *info);
255+
void fbtft_remove_common(struct device *dev, struct fb_info *info);
256256

257257
/* fbtft-io.c */
258258
int fbtft_write_spi(struct fbtft_par *par, void *buf, size_t len);
@@ -283,7 +283,8 @@ static int fbtft_driver_remove_spi(struct spi_device *spi) \
283283
{ \
284284
struct fb_info *info = spi_get_drvdata(spi); \
285285
\
286-
return fbtft_remove_common(&spi->dev, info); \
286+
fbtft_remove_common(&spi->dev, info); \
287+
return 0; \
287288
} \
288289
\
289290
static int fbtft_driver_probe_pdev(struct platform_device *pdev) \
@@ -295,7 +296,8 @@ static int fbtft_driver_remove_pdev(struct platform_device *pdev) \
295296
{ \
296297
struct fb_info *info = platform_get_drvdata(pdev); \
297298
\
298-
return fbtft_remove_common(&pdev->dev, info); \
299+
fbtft_remove_common(&pdev->dev, info); \
300+
return 0; \
299301
} \
300302
\
301303
static const struct of_device_id dt_ids[] = { \

drivers/staging/fieldbus/anybuss/host.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,11 +1318,11 @@ anybuss_host_common_probe(struct device *dev,
13181318
}
13191319
/*
13201320
* startup sequence:
1321-
* perform dummy IND_AB read to prevent false 'init done' irq
1321+
* a) perform dummy IND_AB read to prevent false 'init done' irq
13221322
* (already done by test_dpram() above)
1323-
* release reset
1324-
* wait for first interrupt
1325-
* interrupt came in: ready to go !
1323+
* b) release reset
1324+
* c) wait for first interrupt
1325+
* d) interrupt came in: ready to go !
13261326
*/
13271327
reset_deassert(cd);
13281328
if (!wait_for_completion_timeout(&cd->card_boot, TIMEOUT)) {

drivers/staging/gdm724x/gdm_lte.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,7 @@ int register_lte_device(struct phy_dev *phy_dev,
867867
struct nic *nic;
868868
struct net_device *net;
869869
char pdn_dev_name[16];
870+
u8 addr[ETH_ALEN];
870871
int ret = 0;
871872
u8 index;
872873

@@ -893,11 +894,12 @@ int register_lte_device(struct phy_dev *phy_dev,
893894
nic->phy_dev = phy_dev;
894895
nic->nic_id = index;
895896

896-
form_mac_address(net->dev_addr,
897+
form_mac_address(addr,
897898
nic->src_mac_addr,
898899
nic->dest_mac_addr,
899900
mac_address,
900901
index);
902+
eth_hw_addr_set(net, addr);
901903

902904
SET_NETDEV_DEV(net, dev);
903905
SET_NETDEV_DEVTYPE(net, &wwan_type);

drivers/staging/ks7010/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ config KS7010
55
select WIRELESS_EXT
66
select WEXT_PRIV
77
select FW_LOADER
8+
select CRYPTO
9+
select CRYPTO_HASH
10+
select CRYPTO_MICHAEL_MIC
811
help
912
This is a driver for KeyStream KS7010 based SDIO WIFI cards. It is
1013
found on at least later Spectec SDW-821 (FCC-ID "S2Y-WLAN-11G-K" only,

0 commit comments

Comments
 (0)