Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v7] drivers: most: add USB adapter driver
@ 2020-07-31  8:50 Christian Gromm
  0 siblings, 0 replies; 3+ messages in thread
From: Christian Gromm @ 2020-07-31  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, linux-usb, Christian Gromm

This patch adds the USB driver source file most_usb.c and
modifies the Makefile and Kconfig accordingly.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
v2:
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        - don't remove usb driver from staging area
        - don't touch staging/most/Kconfig
        - remove subdirectory for USB driver and put source file into
          drivers/most
v3:
        - submitted fixes found during code audit to staging version
          first to be able to resend single patch that adds the driver
v4:
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

        submitted patch set that fixes issues found during code audit
        to staging version first to be able to resend single patch that
        adds the driver. The patch series included:

        - use function sysfs_streq
        - add missing put_device calls
        - use correct error codes
        - replace code to calculate array index
        - don't use error path to exit function on success
        - move allocation of URB out of critical section
        - return 0 instead of variable
        - change return value of function drci_rd_reg
        - don't use expressions that might fail in a declaration
        - change order of function parameters

v5:
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

        submitted patch set that fixes issues found during code audit
        to staging version first to be able to resend single patch that
        adds the driver. The patch series included:

        - init return value in default path of switch/case expression

v6:
Reported-by: Randy Dunlap <rdunlap@infradead.org>

	remove dependency to NET in Kconfig file

v7:
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

	created patch with 'git format-patch -M' to show that this is
	a move only.
 
 drivers/most/Kconfig                                | 11 +++++++++++
 drivers/most/Makefile                               |  2 ++
 drivers/{staging/most/usb/usb.c => most/most_usb.c} |  0
 drivers/staging/most/Kconfig                        |  2 --
 drivers/staging/most/usb/Kconfig                    | 13 -------------
 drivers/staging/most/usb/Makefile                   |  4 ----
 6 files changed, 13 insertions(+), 19 deletions(-)
 rename drivers/{staging/most/usb/usb.c => most/most_usb.c} (100%)
 delete mode 100644 drivers/staging/most/usb/Kconfig
 delete mode 100644 drivers/staging/most/usb/Makefile

diff --git a/drivers/most/Kconfig b/drivers/most/Kconfig
index 58d7999..60fc082 100644
--- a/drivers/most/Kconfig
+++ b/drivers/most/Kconfig
@@ -13,3 +13,14 @@ menuconfig MOST
 	  module will be called most_core.
 
 	  If in doubt, say N here.
+
+if MOST
+config MOST_USB_HDM
+	tristate "USB"
+	depends on USB
+	help
+	  Say Y here if you want to connect via USB to network transceiver.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called most_usb.
+endif
diff --git a/drivers/most/Makefile b/drivers/most/Makefile
index e810cd3..6a3cb90 100644
--- a/drivers/most/Makefile
+++ b/drivers/most/Makefile
@@ -2,3 +2,5 @@
 obj-$(CONFIG_MOST) += most_core.o
 most_core-y :=	core.o \
 		configfs.o
+
+obj-$(CONFIG_MOST_USB_HDM) += most_usb.o
diff --git a/drivers/staging/most/usb/usb.c b/drivers/most/most_usb.c
similarity index 100%
rename from drivers/staging/most/usb/usb.c
rename to drivers/most/most_usb.c
diff --git a/drivers/staging/most/Kconfig b/drivers/staging/most/Kconfig
index c5a99f7..c35fb34f 100644
--- a/drivers/staging/most/Kconfig
+++ b/drivers/staging/most/Kconfig
@@ -30,6 +30,4 @@ source "drivers/staging/most/dim2/Kconfig"
 
 source "drivers/staging/most/i2c/Kconfig"
 
-source "drivers/staging/most/usb/Kconfig"
-
 endif
diff --git a/drivers/staging/most/usb/Kconfig b/drivers/staging/most/usb/Kconfig
deleted file mode 100644
index a47a973..0000000
--- a/drivers/staging/most/usb/Kconfig
+++ /dev/null
@@ -1,13 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# MOST USB configuration
-#
-
-config MOST_USB
-	tristate "USB"
-	depends on USB
-	help
-	  Say Y here if you want to connect via USB to network transceiver.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called most_usb.
diff --git a/drivers/staging/most/usb/Makefile b/drivers/staging/most/usb/Makefile
deleted file mode 100644
index c2b2073..0000000
--- a/drivers/staging/most/usb/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_MOST_USB) += most_usb.o
-
-most_usb-objs := usb.o
-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v7] drivers: most: add USB adapter driver
  2020-07-31 12:20 Christian Gromm
@ 2020-07-31 12:40 ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2020-07-31 12:40 UTC (permalink / raw)
  To: Christian Gromm; +Cc: driverdev-devel, linux-usb

On Fri, Jul 31, 2020 at 02:20:58PM +0200, Christian Gromm wrote:
> This patch adds the USB driver source file most_usb.c and
> modifies the Makefile and Kconfig accordingly.
> 
> Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
> ---
> v2:
> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>         - don't remove usb driver from staging area
>         - don't touch staging/most/Kconfig
>         - remove subdirectory for USB driver and put source file into
>           drivers/most
> v3:
>         - submitted fixes found during code audit to staging version
>           first to be able to resend single patch that adds the driver
> v4:
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
>         submitted patch set that fixes issues found during code audit
>         to staging version first to be able to resend single patch that
>         adds the driver. The patch series included:
> 
>         - use function sysfs_streq
>         - add missing put_device calls
>         - use correct error codes
>         - replace code to calculate array index
>         - don't use error path to exit function on success
>         - move allocation of URB out of critical section
>         - return 0 instead of variable
>         - change return value of function drci_rd_reg
>         - don't use expressions that might fail in a declaration
>         - change order of function parameters
> 
> v5:
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
>         submitted patch set that fixes issues found during code audit
>         to staging version first to be able to resend single patch that
>         adds the driver. The patch series included:
> 
>         - init return value in default path of switch/case expression
> 
> v6:
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> 
> 	remove dependency to NET in Kconfig file
> 
> v7:
> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> 	created patch with 'git format-patch -M' to show that this is
> 	a move only.
>  
>  drivers/most/Kconfig                                | 11 +++++++++++
>  drivers/most/Makefile                               |  2 ++
>  drivers/{staging/most/usb/usb.c => most/most_usb.c} |  0
>  drivers/staging/most/Kconfig                        |  2 --
>  drivers/staging/most/usb/Kconfig                    | 13 -------------
>  drivers/staging/most/usb/Makefile                   |  4 ----
>  6 files changed, 13 insertions(+), 19 deletions(-)
>  rename drivers/{staging/most/usb/usb.c => most/most_usb.c} (100%)
>  delete mode 100644 drivers/staging/most/usb/Kconfig
>  delete mode 100644 drivers/staging/most/usb/Makefile

Thanks, this worked, now queued up!

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v7] drivers: most: add USB adapter driver
@ 2020-07-31 12:20 Christian Gromm
  2020-07-31 12:40 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Gromm @ 2020-07-31 12:20 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, linux-usb, Christian Gromm

This patch adds the USB driver source file most_usb.c and
modifies the Makefile and Kconfig accordingly.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
v2:
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        - don't remove usb driver from staging area
        - don't touch staging/most/Kconfig
        - remove subdirectory for USB driver and put source file into
          drivers/most
v3:
        - submitted fixes found during code audit to staging version
          first to be able to resend single patch that adds the driver
v4:
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

        submitted patch set that fixes issues found during code audit
        to staging version first to be able to resend single patch that
        adds the driver. The patch series included:

        - use function sysfs_streq
        - add missing put_device calls
        - use correct error codes
        - replace code to calculate array index
        - don't use error path to exit function on success
        - move allocation of URB out of critical section
        - return 0 instead of variable
        - change return value of function drci_rd_reg
        - don't use expressions that might fail in a declaration
        - change order of function parameters

v5:
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

        submitted patch set that fixes issues found during code audit
        to staging version first to be able to resend single patch that
        adds the driver. The patch series included:

        - init return value in default path of switch/case expression

v6:
Reported-by: Randy Dunlap <rdunlap@infradead.org>

	remove dependency to NET in Kconfig file

v7:
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

	created patch with 'git format-patch -M' to show that this is
	a move only.
 
 drivers/most/Kconfig                                | 11 +++++++++++
 drivers/most/Makefile                               |  2 ++
 drivers/{staging/most/usb/usb.c => most/most_usb.c} |  0
 drivers/staging/most/Kconfig                        |  2 --
 drivers/staging/most/usb/Kconfig                    | 13 -------------
 drivers/staging/most/usb/Makefile                   |  4 ----
 6 files changed, 13 insertions(+), 19 deletions(-)
 rename drivers/{staging/most/usb/usb.c => most/most_usb.c} (100%)
 delete mode 100644 drivers/staging/most/usb/Kconfig
 delete mode 100644 drivers/staging/most/usb/Makefile

diff --git a/drivers/most/Kconfig b/drivers/most/Kconfig
index 58d7999..60fc082 100644
--- a/drivers/most/Kconfig
+++ b/drivers/most/Kconfig
@@ -13,3 +13,14 @@ menuconfig MOST
 	  module will be called most_core.
 
 	  If in doubt, say N here.
+
+if MOST
+config MOST_USB_HDM
+	tristate "USB"
+	depends on USB
+	help
+	  Say Y here if you want to connect via USB to network transceiver.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called most_usb.
+endif
diff --git a/drivers/most/Makefile b/drivers/most/Makefile
index e810cd3..6a3cb90 100644
--- a/drivers/most/Makefile
+++ b/drivers/most/Makefile
@@ -2,3 +2,5 @@
 obj-$(CONFIG_MOST) += most_core.o
 most_core-y :=	core.o \
 		configfs.o
+
+obj-$(CONFIG_MOST_USB_HDM) += most_usb.o
diff --git a/drivers/staging/most/usb/usb.c b/drivers/most/most_usb.c
similarity index 100%
rename from drivers/staging/most/usb/usb.c
rename to drivers/most/most_usb.c
diff --git a/drivers/staging/most/Kconfig b/drivers/staging/most/Kconfig
index c5a99f7..c35fb34f 100644
--- a/drivers/staging/most/Kconfig
+++ b/drivers/staging/most/Kconfig
@@ -30,6 +30,4 @@ source "drivers/staging/most/dim2/Kconfig"
 
 source "drivers/staging/most/i2c/Kconfig"
 
-source "drivers/staging/most/usb/Kconfig"
-
 endif
diff --git a/drivers/staging/most/usb/Kconfig b/drivers/staging/most/usb/Kconfig
deleted file mode 100644
index a47a973..0000000
--- a/drivers/staging/most/usb/Kconfig
+++ /dev/null
@@ -1,13 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# MOST USB configuration
-#
-
-config MOST_USB
-	tristate "USB"
-	depends on USB
-	help
-	  Say Y here if you want to connect via USB to network transceiver.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called most_usb.
diff --git a/drivers/staging/most/usb/Makefile b/drivers/staging/most/usb/Makefile
deleted file mode 100644
index c2b2073..0000000
--- a/drivers/staging/most/usb/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_MOST_USB) += most_usb.o
-
-most_usb-objs := usb.o
-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31  8:50 [PATCH v7] drivers: most: add USB adapter driver Christian Gromm
2020-07-31 12:20 Christian Gromm
2020-07-31 12:40 ` Greg KH

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git