Skip to content

Commit 125ca74

Browse files
committed
Merge tag 'staging-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver updates from Greg KH: "Here's the pretty small staging driver tree update for 6.14-rc1. Not much happened this development cycle: - deleted some unused ioctl code from the rtl8723bs driver - gpib driver cleanups and fixes - other tiny minor coding style fixes. All of these have been in linux-next for a while with no reported issues" * tag 'staging-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (38 commits) staging: gpib: Agilent usb code cleanup staging: gpib: Fix NULL pointer dereference in detach staging: gpib: Fix inadvertent negative shift staging: gpib: fix prefixing 0x with decimal output staging: gpib: Use C99 syntax and make static staging: gpib: Avoid plain integers as NULL pointers staging: gpib: Use __user for user space pointers staging: gpib: Use __iomem attribute for io addresses staging: gpib: Add missing mutex unlock in ni usb driver staging: gpib: Add missing mutex unlock in agilent usb driver staging: gpib: Modernize gpib_interface_t initialization and make static staging: gpib: Remove commented-out debug code staging: rtl8723bs: Remove ioctl interface staging: gpib: tnt4882: Handle gpib_register_driver() errors staging: gpib: pc2: Handle gpib_register_driver() errors staging: gpib: ni_usb: Handle gpib_register_driver() errors staging: gpib: lpvo_usb: Return error value from gpib_register_driver() staging: gpib: ines: Handle gpib_register_driver() errors staging: gpib: hp_82341: Handle gpib_register_driver() errors staging: gpib: hp_82335: Return error value from gpib_register_driver() ...
2 parents cc8b10f + 579b6f1 commit 125ca74

Some content is hidden

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

43 files changed

+1851
-2909
lines changed

drivers/staging/fbtft/fb_ssd1351.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <linux/init.h>
77
#include <linux/spi/spi.h>
88
#include <linux/delay.h>
9+
#include <linux/string_choices.h>
910

1011
#include "fbtft.h"
1112

@@ -162,7 +163,7 @@ static int set_gamma(struct fbtft_par *par, u32 *curves)
162163
static int blank(struct fbtft_par *par, bool on)
163164
{
164165
fbtft_par_dbg(DEBUG_BLANK, par, "(%s=%s)\n",
165-
__func__, on ? "true" : "false");
166+
__func__, str_true_false(on));
166167
if (on)
167168
write_reg(par, 0xAE);
168169
else

drivers/staging/gpib/agilent_82350b/agilent_82350b.c

Lines changed: 76 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@ int agilent_82350b_accel_read(gpib_board_t *board, uint8_t *buffer, size_t lengt
3030
unsigned short event_status;
3131
int i, num_fifo_bytes;
3232
//hardware doesn't support checking for end-of-string character when using fifo
33-
if (tms_priv->eos_flags & REOS) {
34-
//pr_info("ag-rd: using tms9914 read for REOS %x EOS %x\n",tms_priv->eos_flags,
35-
// tms_priv->eos);
33+
if (tms_priv->eos_flags & REOS)
3634
return tms9914_read(board, tms_priv, buffer, length, end, bytes_read);
37-
}
3835

3936
clear_bit(DEV_CLEAR_BN, &tms_priv->state);
4037

@@ -811,15 +808,15 @@ void agilent_82350b_detach(gpib_board_t *board)
811808
if (a_priv->gpib_base) {
812809
tms9914_board_reset(tms_priv);
813810
if (a_priv->misc_base)
814-
iounmap((void *)a_priv->misc_base);
811+
iounmap(a_priv->misc_base);
815812
if (a_priv->borg_base)
816-
iounmap((void *)a_priv->borg_base);
813+
iounmap(a_priv->borg_base);
817814
if (a_priv->sram_base)
818-
iounmap((void *)a_priv->sram_base);
815+
iounmap(a_priv->sram_base);
819816
if (a_priv->gpib_base)
820-
iounmap((void *)a_priv->gpib_base);
817+
iounmap(a_priv->gpib_base);
821818
if (a_priv->plx_base)
822-
iounmap((void *)a_priv->plx_base);
819+
iounmap(a_priv->plx_base);
823820
pci_release_regions(a_priv->pci_device);
824821
}
825822
if (a_priv->pci_device)
@@ -828,58 +825,58 @@ void agilent_82350b_detach(gpib_board_t *board)
828825
agilent_82350b_free_private(board);
829826
}
830827

831-
gpib_interface_t agilent_82350b_unaccel_interface = {
832-
name: "agilent_82350b_unaccel",
833-
attach : agilent_82350b_unaccel_attach,
834-
detach : agilent_82350b_detach,
835-
read : agilent_82350b_read,
836-
write : agilent_82350b_write,
837-
command : agilent_82350b_command,
838-
request_system_control : agilent_82350b_request_system_control,
839-
take_control : agilent_82350b_take_control,
840-
go_to_standby : agilent_82350b_go_to_standby,
841-
interface_clear : agilent_82350b_interface_clear,
842-
remote_enable : agilent_82350b_remote_enable,
843-
enable_eos : agilent_82350b_enable_eos,
844-
disable_eos : agilent_82350b_disable_eos,
845-
parallel_poll : agilent_82350b_parallel_poll,
846-
parallel_poll_configure : agilent_82350b_parallel_poll_configure,
847-
parallel_poll_response : agilent_82350b_parallel_poll_response,
848-
local_parallel_poll_mode : NULL, // XXX
849-
line_status : agilent_82350b_line_status,
850-
update_status : agilent_82350b_update_status,
851-
primary_address : agilent_82350b_primary_address,
852-
secondary_address : agilent_82350b_secondary_address,
853-
serial_poll_response : agilent_82350b_serial_poll_response,
854-
t1_delay : agilent_82350b_t1_delay,
855-
return_to_local : agilent_82350b_return_to_local,
828+
static gpib_interface_t agilent_82350b_unaccel_interface = {
829+
.name = "agilent_82350b_unaccel",
830+
.attach = agilent_82350b_unaccel_attach,
831+
.detach = agilent_82350b_detach,
832+
.read = agilent_82350b_read,
833+
.write = agilent_82350b_write,
834+
.command = agilent_82350b_command,
835+
.request_system_control = agilent_82350b_request_system_control,
836+
.take_control = agilent_82350b_take_control,
837+
.go_to_standby = agilent_82350b_go_to_standby,
838+
.interface_clear = agilent_82350b_interface_clear,
839+
.remote_enable = agilent_82350b_remote_enable,
840+
.enable_eos = agilent_82350b_enable_eos,
841+
.disable_eos = agilent_82350b_disable_eos,
842+
.parallel_poll = agilent_82350b_parallel_poll,
843+
.parallel_poll_configure = agilent_82350b_parallel_poll_configure,
844+
.parallel_poll_response = agilent_82350b_parallel_poll_response,
845+
.local_parallel_poll_mode = NULL, // XXX
846+
.line_status = agilent_82350b_line_status,
847+
.update_status = agilent_82350b_update_status,
848+
.primary_address = agilent_82350b_primary_address,
849+
.secondary_address = agilent_82350b_secondary_address,
850+
.serial_poll_response = agilent_82350b_serial_poll_response,
851+
.t1_delay = agilent_82350b_t1_delay,
852+
.return_to_local = agilent_82350b_return_to_local,
856853
};
857854

858-
gpib_interface_t agilent_82350b_interface = {
859-
name: "agilent_82350b",
860-
attach : agilent_82350b_accel_attach,
861-
detach : agilent_82350b_detach,
862-
read : agilent_82350b_accel_read,
863-
write : agilent_82350b_accel_write,
864-
command : agilent_82350b_command,
865-
request_system_control : agilent_82350b_request_system_control,
866-
take_control : agilent_82350b_take_control,
867-
go_to_standby : agilent_82350b_go_to_standby,
868-
interface_clear : agilent_82350b_interface_clear,
869-
remote_enable : agilent_82350b_remote_enable,
870-
enable_eos : agilent_82350b_enable_eos,
871-
disable_eos : agilent_82350b_disable_eos,
872-
parallel_poll : agilent_82350b_parallel_poll,
873-
parallel_poll_configure : agilent_82350b_parallel_poll_configure,
874-
parallel_poll_response : agilent_82350b_parallel_poll_response,
875-
local_parallel_poll_mode : NULL, // XXX
876-
line_status : agilent_82350b_line_status,
877-
update_status : agilent_82350b_update_status,
878-
primary_address : agilent_82350b_primary_address,
879-
secondary_address : agilent_82350b_secondary_address,
880-
serial_poll_response : agilent_82350b_serial_poll_response,
881-
t1_delay : agilent_82350b_t1_delay,
882-
return_to_local : agilent_82350b_return_to_local,
855+
static gpib_interface_t agilent_82350b_interface = {
856+
.name = "agilent_82350b",
857+
.attach = agilent_82350b_accel_attach,
858+
.detach = agilent_82350b_detach,
859+
.read = agilent_82350b_accel_read,
860+
.write = agilent_82350b_accel_write,
861+
.command = agilent_82350b_command,
862+
.request_system_control = agilent_82350b_request_system_control,
863+
.take_control = agilent_82350b_take_control,
864+
.go_to_standby = agilent_82350b_go_to_standby,
865+
.interface_clear = agilent_82350b_interface_clear,
866+
.remote_enable = agilent_82350b_remote_enable,
867+
.enable_eos = agilent_82350b_enable_eos,
868+
.disable_eos = agilent_82350b_disable_eos,
869+
.parallel_poll = agilent_82350b_parallel_poll,
870+
.parallel_poll_configure = agilent_82350b_parallel_poll_configure,
871+
.parallel_poll_response = agilent_82350b_parallel_poll_response,
872+
.local_parallel_poll_mode = NULL, // XXX
873+
.line_status = agilent_82350b_line_status,
874+
.update_status = agilent_82350b_update_status,
875+
.primary_address = agilent_82350b_primary_address,
876+
.secondary_address = agilent_82350b_secondary_address,
877+
.serial_poll_response = agilent_82350b_serial_poll_response,
878+
.t1_delay = agilent_82350b_t1_delay,
879+
.return_to_local = agilent_82350b_return_to_local,
883880
};
884881

885882
static int agilent_82350b_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
@@ -910,13 +907,30 @@ static int __init agilent_82350b_init_module(void)
910907

911908
result = pci_register_driver(&agilent_82350b_pci_driver);
912909
if (result) {
913-
pr_err("agilent_82350b: pci_driver_register failed!\n");
910+
pr_err("agilent_82350b: pci_register_driver failed: error = %d\n", result);
914911
return result;
915912
}
916913

917-
gpib_register_driver(&agilent_82350b_unaccel_interface, THIS_MODULE);
918-
gpib_register_driver(&agilent_82350b_interface, THIS_MODULE);
914+
result = gpib_register_driver(&agilent_82350b_unaccel_interface, THIS_MODULE);
915+
if (result) {
916+
pr_err("agilent_82350b: gpib_register_driver failed: error = %d\n", result);
917+
goto err_unaccel;
918+
}
919+
920+
result = gpib_register_driver(&agilent_82350b_interface, THIS_MODULE);
921+
if (result) {
922+
pr_err("agilent_82350b: gpib_register_driver failed: error = %d\n", result);
923+
goto err_interface;
924+
}
925+
919926
return 0;
927+
928+
err_interface:
929+
gpib_unregister_driver(&agilent_82350b_unaccel_interface);
930+
err_unaccel:
931+
pci_unregister_driver(&agilent_82350b_pci_driver);
932+
933+
return result;
920934
}
921935

922936
static void __exit agilent_82350b_exit_module(void)

drivers/staging/gpib/agilent_82350b/agilent_82350b.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ enum board_model {
4545
struct agilent_82350b_priv {
4646
struct tms9914_priv tms9914_priv;
4747
struct pci_dev *pci_device;
48-
void *plx_base; //82350a only
49-
void *gpib_base;
50-
void *sram_base;
51-
void *misc_base;
52-
void *borg_base;
48+
void __iomem *plx_base; //82350a only
49+
void __iomem *gpib_base;
50+
void __iomem *sram_base;
51+
void __iomem *misc_base;
52+
void __iomem *borg_base;
5353
int irq;
5454
unsigned short card_mode_bits;
5555
unsigned short event_status_bits;
@@ -60,8 +60,6 @@ struct agilent_82350b_priv {
6060
// driver name
6161
extern const char *driver_name;
6262

63-
// interfaces
64-
extern gpib_interface_t agilent_82350b_interface;
6563
// init functions
6664

6765
int agilent_82350b_unaccel_attach(gpib_board_t *board, const gpib_board_config_t *config);

0 commit comments

Comments
 (0)