[PATCH] Staging: most: Remove check for __cplusplus in headers

2016-03-06 Thread PrasannaKumar Muralidharan
From: PrasannaKumar Muralidharan 

Signed-off-by: PrasannaKumar Muralidharan 
---
 drivers/staging/most/hdm-dim2/dim2_errors.h | 8 
 drivers/staging/most/hdm-dim2/dim2_hal.h| 8 
 drivers/staging/most/hdm-dim2/dim2_reg.h| 8 
 3 files changed, 24 deletions(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_errors.h 
b/drivers/staging/most/hdm-dim2/dim2_errors.h
index 5a713df..66343ba 100644
--- a/drivers/staging/most/hdm-dim2/dim2_errors.h
+++ b/drivers/staging/most/hdm-dim2/dim2_errors.h
@@ -15,10 +15,6 @@
 #ifndef _MOST_DIM_ERRORS_H
 #define _MOST_DIM_ERRORS_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * MOST DIM errors.
  */
@@ -58,8 +54,4 @@ enum dim_errors_t {
DIM_ERR_OVERFLOW,
 };
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _MOST_DIM_ERRORS_H */
diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.h 
b/drivers/staging/most/hdm-dim2/dim2_hal.h
index 9aa4ce0..ee10ed9 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hal.h
+++ b/drivers/staging/most/hdm-dim2/dim2_hal.h
@@ -18,10 +18,6 @@
 #include 
 #include "dim2_reg.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*
  * The values below are specified in the hardware specification.
  * So, they should not be changed until the hardware specification changes.
@@ -108,8 +104,4 @@ void dimcb_io_write(u32 __iomem *ptr32, u32 value);
 
 void dimcb_on_error(u8 error_id, const char *error_message);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _DIM2_HAL_H */
diff --git a/drivers/staging/most/hdm-dim2/dim2_reg.h 
b/drivers/staging/most/hdm-dim2/dim2_reg.h
index bcf6a79..e0837b6 100644
--- a/drivers/staging/most/hdm-dim2/dim2_reg.h
+++ b/drivers/staging/most/hdm-dim2/dim2_reg.h
@@ -17,10 +17,6 @@
 
 #include 
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct dim2_regs {
/* 0x00 */ u32 MLBC0;
/* 0x01 */ u32 rsvd0[1];
@@ -166,8 +162,4 @@ enum {
CAT_CL_MASK = DIM2_MASK(6)
 };
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* DIM2_OS62420_H */
-- 
2.5.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: most: Remove check for __cplusplus in headers

2016-03-06 Thread Giedrius Statkevičius
On Sun, Mar 06, 2016 at 03:50:16PM +0530, PrasannaKumar Muralidharan wrote:
> From: PrasannaKumar Muralidharan 
> 
> Signed-off-by: PrasannaKumar Muralidharan 
Commit message is missing.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 RESEND 1/1] staging: ion: debugfs invalid gfp mask

2016-03-06 Thread Derek Yerger

From drivers/staging/android TODO file - sparse errors.

The current code attempts assignment of -1 to an unsigned type. Note that in a
downstream function ion_page_pool_shrink this mask is only ever evaluated
against __GFP_HIGHMEM (drivers/staging/android/ion/ion_page_pool.c, line 125).

Signed-off-by: Derek Yerger 
Reviewed-by: Laura Abbott 
---
diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index c97e82b..a9c8861 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -1524,7 +1524,7 @@ static int debug_shrink_set(void *data, u64 val)
struct shrink_control sc;
int objs;

-   sc.gfp_mask = -1;
+   sc.gfp_mask = GFP_HIGHUSER;
sc.nr_to_scan = val;

if (!val) {
@@ -1542,7 +1542,7 @@ static int debug_shrink_get(void *data, u64 *val)
struct shrink_control sc;
int objs;

-   sc.gfp_mask = -1;
+   sc.gfp_mask = GFP_HIGHUSER;
sc.nr_to_scan = 0;

objs = heap->shrinker.count_objects(&heap->shrinker, &sc);
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: android: Fixed coding style issues reported by checkpatch

2016-03-06 Thread Saiyam Doshi
List of modified files with comment,
lowmemorykiller.c: Added blank line after array declaration
sync.h: Added comment for spinlock_t definition,
Fixed parentheses alignment in function declaration
sync_debug.c: Removed unnecessary braces for single statement block
timed_gpio.c: Added comment for spinlock_t definition

Signed-off-by: Saiyam Doshi 
---
 drivers/staging/android/lowmemorykiller.c |  2 ++
 drivers/staging/android/sync.h| 10 ++
 drivers/staging/android/sync_debug.c  |  3 +--
 drivers/staging/android/timed_gpio.c  |  1 +
 4 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/android/lowmemorykiller.c 
b/drivers/staging/android/lowmemorykiller.c
index 8b5a4a8..256b257 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -50,6 +50,7 @@ static short lowmem_adj[6] = {
6,
12,
 };
+
 static int lowmem_adj_size = 4;
 static int lowmem_minfree[6] = {
3 * 512,/* 6MB */
@@ -57,6 +58,7 @@ static int lowmem_minfree[6] = {
4 * 1024,   /* 16MB */
16 * 1024,  /* 64MB */
 };
+
 static int lowmem_minfree_size = 4;
 
 static unsigned long lowmem_deathpending_timeout;
diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h
index afa0752..c55204b 100644
--- a/drivers/staging/android/sync.h
+++ b/drivers/staging/android/sync.h
@@ -93,16 +93,13 @@ struct sync_timeline {
struct kref kref;
const struct sync_timeline_ops  *ops;
charname[32];
-
/* protected by child_list_lock */
booldestroyed;
int context, value;
-
struct list_headchild_list_head;
+   /* lock to protect child_list_head */
spinlock_t  child_list_lock;
-
struct list_headactive_list_head;
-
 #ifdef CONFIG_DEBUG_FS
struct list_headsync_timeline_list;
 #endif
@@ -122,7 +119,6 @@ struct sync_timeline {
  */
 struct sync_pt {
struct fence base;
-
struct list_headchild_list;
struct list_headactive_list;
 };
@@ -159,10 +155,8 @@ struct sync_fence {
struct list_headsync_fence_list;
 #endif
int num_fences;
-
wait_queue_head_t   wq;
atomic_tstatus;
-
struct sync_fence_cbcbs[];
 };
 
@@ -361,6 +355,6 @@ void sync_dump(void);
 # define sync_dump()
 #endif
 int sync_fence_wake_up_wq(wait_queue_t *curr, unsigned mode,
-int wake_flags, void *key);
+ int wake_flags, void *key);
 
 #endif /* _LINUX_SYNC_H */
diff --git a/drivers/staging/android/sync_debug.c 
b/drivers/staging/android/sync_debug.c
index f45d13c..02a1649 100644
--- a/drivers/staging/android/sync_debug.c
+++ b/drivers/staging/android/sync_debug.c
@@ -158,9 +158,8 @@ static void sync_print_fence(struct seq_file *s, struct 
sync_fence *fence)
seq_printf(s, "[%p] %s: %s\n", fence, fence->name,
   sync_status_str(atomic_read(&fence->status)));
 
-   for (i = 0; i < fence->num_fences; ++i) {
+   for (i = 0; i < fence->num_fences; ++i)
sync_print_pt(s, fence->cbs[i].sync_pt, true);
-   }
 
spin_lock_irqsave(&fence->wq.lock, flags);
list_for_each_entry(pos, &fence->wq.task_list, task_list) {
diff --git a/drivers/staging/android/timed_gpio.c 
b/drivers/staging/android/timed_gpio.c
index bcd9924..cede99a 100644
--- a/drivers/staging/android/timed_gpio.c
+++ b/drivers/staging/android/timed_gpio.c
@@ -28,6 +28,7 @@
 struct timed_gpio_data {
struct timed_output_dev dev;
struct hrtimer timer;
+   /* lock protects gpio access while setting it's value */
spinlock_t lock;
unsigned gpio;
int max_timeout;
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: octeon-usb: Fixed block comments coding style issue in octeon-hcd.c

2016-03-06 Thread Claudiu Beznea
This is a patch to the octeon-hcd.c file that fixes up block comments
warning found by checkpatch.pl tool

Signed-off-by: Claudiu Beznea 
---
 drivers/staging/octeon-usb/octeon-hcd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/octeon-usb/octeon-hcd.c 
b/drivers/staging/octeon-usb/octeon-hcd.c
index 6f28717..16d4587 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -2006,7 +2006,8 @@ static void octeon_usb_urb_complete_callback(struct 
cvmx_usb_state *usb,
urb->hcpriv = NULL;
 
/* For Isochronous transactions we need to update the URB packet status
-  list from data in our private copy */
+* list from data in our private copy
+*/
if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
int i;
/*
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/1] staging: android: Fixed coding style issues reported by checkpatch

2016-03-06 Thread Greg KH
On Mon, Mar 07, 2016 at 01:00:33AM +0530, Saiyam Doshi wrote:
> List of modified files with comment,
> lowmemorykiller.c: Added blank line after array declaration
> sync.h: Added comment for spinlock_t definition,
> Fixed parentheses alignment in function declaration
> sync_debug.c: Removed unnecessary braces for single statement block
> timed_gpio.c: Added comment for spinlock_t definition

You need to do only one thing per patch, please split this up into
multiple patches.

Also verify that these are all really needed, please always work against
linux-next, not Linus's kernel tree.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] isdn: i4l: move active-isdn drivers to staging

2016-03-06 Thread Holger Schurig
I know that in Germany a good amount of land-line telephone line are
still using ISDN. Some telco company try to move people to IP only, but
this is currently still a process.

Especially company line are using ISDN still, and there are some Linux
programs that act on then, e.g. Asterisk and derived PBX software has
ISDN support which is actively used.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/2] staging: dgnc: use pointer type of tty_struct

2016-03-06 Thread Sudip Mukherjee
On Mon, Feb 29, 2016 at 11:15:51AM +0900, Daeseok Youn wrote:
> From 70f8703b3bd73fa56f4ea91e98967b8925550aa6 Mon Sep 17 00:00:00 2001
> From: Daeseok Youn 
> Date: Thu, 25 Feb 2016 14:53:37 +0900
> Subject: [PATCH 1/2] staging: dgnc: use pointer type of tty_struct

These lines above are not required in the commit log. Please send v2 of
both your patches without these lines.

regards
sudip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/2] staging: dgnc: use pointer type of tty_struct

2016-03-06 Thread DaeSeok Youn
2016-03-07 16:10 GMT+09:00 Sudip Mukherjee :
>
> On Mon, Feb 29, 2016 at 11:15:51AM +0900, Daeseok Youn wrote:
> > From 70f8703b3bd73fa56f4ea91e98967b8925550aa6 Mon Sep 17 00:00:00 2001
> > From: Daeseok Youn 
> > Date: Thu, 25 Feb 2016 14:53:37 +0900
> > Subject: [PATCH 1/2] staging: dgnc: use pointer type of tty_struct
>
> These lines above are not required in the commit log. Please send v2 of
> both your patches without these lines.

ok. I will send my patches again.

Thanks.

regards,
Daeseok.
>
> regards
> sudip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH V3] staging: rtl8192u: check return value of read_nic_word_E

2016-03-06 Thread Sudip Mukherjee
On Fri, Mar 04, 2016 at 11:40:29AM +0100, Salah Triki wrote:
> The call of read_nic_word_E may fail, therefore its return value must be
> checked.
> 
> Signed-off-by: Salah Triki 
> ---
>  drivers/staging/rtl8192u/r8180_93cx6.c |  30 +--
>  drivers/staging/rtl8192u/r8180_93cx6.h |   2 +-
>  drivers/staging/rtl8192u/r8192U_core.c | 140 
> ++---
>  3 files changed, 119 insertions(+), 53 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r8180_93cx6.c 
> b/drivers/staging/rtl8192u/r8180_93cx6.c

> @@ -144,7 +157,10 @@ u32 eprom_read(struct net_device *dev, u32 addr)
>* and reading data. (eeprom outs a dummy 0)
>*/
>   eprom_ck_cycle(dev);
> - ret |= (eprom_r(dev)<<(15-i));
> + err = eprom_r(dev)<<(15-i);

read_nic_byte_E() can return -ENOMEM so eprom_r() also can return
-ENOMEM. So if eprom_r() fails then err becomes -12 << (15-i) where i
ranges from 0 to 16.

> + if (err)
> + return err;

And that values is used to decide the error. oops... am i reading it
properly?

regards
sudip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2 V2] staging: dgnc: use pointer type of tty_struct

2016-03-06 Thread Daeseok Youn
For using tty_alloc_driver, SerialDriver has to be pointer type.
It also has checkpatch.pl warning about Camelcase, so
SerialDriver is changed to serial_driver.

Signed-off-by: Daeseok Youn 
---
V2: removes appended email header on top of commit log

 drivers/staging/dgnc/dgnc_driver.h |   4 +-
 drivers/staging/dgnc/dgnc_tty.c| 118 ++---
 2 files changed, 61 insertions(+), 61 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_driver.h 
b/drivers/staging/dgnc/dgnc_driver.h
index ce7cd9b..1c7a8fa 100644
--- a/drivers/staging/dgnc/dgnc_driver.h
+++ b/drivers/staging/dgnc/dgnc_driver.h
@@ -205,9 +205,9 @@ struct dgnc_board {
 * to our channels.
 */
 
-   struct tty_driver   SerialDriver;
+   struct tty_driver *serial_driver;
charSerialName[200];
-   struct tty_driver   PrintDriver;
+   struct tty_driver *print_driver;
charPrintName[200];
 
booldgnc_Major_Serial_Registered;
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index b79eab0..e91cf70 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -178,20 +178,20 @@ int dgnc_tty_register(struct dgnc_board *brd)
 {
int rc = 0;
 
-   brd->SerialDriver.magic = TTY_DRIVER_MAGIC;
+   brd->serial_driver->magic = TTY_DRIVER_MAGIC;
 
snprintf(brd->SerialName, MAXTTYNAMELEN, "tty_dgnc_%d_", brd->boardnum);
 
-   brd->SerialDriver.name = brd->SerialName;
-   brd->SerialDriver.name_base = 0;
-   brd->SerialDriver.major = 0;
-   brd->SerialDriver.minor_start = 0;
-   brd->SerialDriver.num = brd->maxports;
-   brd->SerialDriver.type = TTY_DRIVER_TYPE_SERIAL;
-   brd->SerialDriver.subtype = SERIAL_TYPE_NORMAL;
-   brd->SerialDriver.init_termios = DgncDefaultTermios;
-   brd->SerialDriver.driver_name = DRVSTR;
-   brd->SerialDriver.flags = (TTY_DRIVER_REAL_RAW |
+   brd->serial_driver->name = brd->SerialName;
+   brd->serial_driver->name_base = 0;
+   brd->serial_driver->major = 0;
+   brd->serial_driver->minor_start = 0;
+   brd->serial_driver->num = brd->maxports;
+   brd->serial_driver->type = TTY_DRIVER_TYPE_SERIAL;
+   brd->serial_driver->subtype = SERIAL_TYPE_NORMAL;
+   brd->serial_driver->init_termios = DgncDefaultTermios;
+   brd->serial_driver->driver_name = DRVSTR;
+   brd->serial_driver->flags = (TTY_DRIVER_REAL_RAW |
   TTY_DRIVER_DYNAMIC_DEV |
   TTY_DRIVER_HARDWARE_BREAK);
 
@@ -199,28 +199,28 @@ int dgnc_tty_register(struct dgnc_board *brd)
 * The kernel wants space to store pointers to
 * tty_struct's and termios's.
 */
-   brd->SerialDriver.ttys = kcalloc(brd->maxports,
-sizeof(*brd->SerialDriver.ttys),
+   brd->serial_driver->ttys = kcalloc(brd->maxports,
+sizeof(*brd->serial_driver->ttys),
 GFP_KERNEL);
-   if (!brd->SerialDriver.ttys)
+   if (!brd->serial_driver->ttys)
return -ENOMEM;
 
-   kref_init(&brd->SerialDriver.kref);
-   brd->SerialDriver.termios = kcalloc(brd->maxports,
-   sizeof(*brd->SerialDriver.termios),
+   kref_init(&brd->serial_driver->kref);
+   brd->serial_driver->termios = kcalloc(brd->maxports,
+   
sizeof(*brd->serial_driver->termios),
GFP_KERNEL);
-   if (!brd->SerialDriver.termios)
+   if (!brd->serial_driver->termios)
return -ENOMEM;
 
/*
 * Entry points for driver.  Called by the kernel from
 * tty_io.c and n_tty.c.
 */
-   tty_set_operations(&brd->SerialDriver, &dgnc_tty_ops);
+   tty_set_operations(brd->serial_driver, &dgnc_tty_ops);
 
if (!brd->dgnc_Major_Serial_Registered) {
/* Register tty devices */
-   rc = tty_register_driver(&brd->SerialDriver);
+   rc = tty_register_driver(brd->serial_driver);
if (rc < 0) {
dev_dbg(&brd->pdev->dev,
"Can't register tty device (%d)\n", rc);
@@ -234,19 +234,19 @@ int dgnc_tty_register(struct dgnc_board *brd)
 * again, separately so we don't get the LD confused about what major
 * we are when we get into the dgnc_tty_open() routine.
 */
-   brd->PrintDriver.magic = TTY_DRIVER_MAGIC;
+   brd->print_driver->magic = TTY_DRIVER_MAGIC;
snprintf(brd->PrintName, MAXTTYNAMELEN, "pr_dgnc_%d_", brd->boardnum);
 
-   brd->PrintDriver.name = brd->PrintName;
-   brd->PrintDriver.name_base = 0;
-   brd->PrintDriver.major =

[PATCH 2/2 V2] staging: dgnc: use tty_alloc_driver instead of kcalloc

2016-03-06 Thread Daeseok Youn
the tty_alloc_driver() can allocate memory for ttys and termios.
And also it can release allocated memory easly with using
put_tty_driver().

Signed-off-by: Daeseok Youn 
---
V2: removes appended email header on top of commit log

 drivers/staging/dgnc/dgnc_tty.c | 86 +++--
 1 file changed, 31 insertions(+), 55 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index e91cf70..6437a81 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -176,9 +176,15 @@ int dgnc_tty_preinit(void)
  */
 int dgnc_tty_register(struct dgnc_board *brd)
 {
-   int rc = 0;
+   int rc;
+
+   brd->serial_driver = tty_alloc_driver(brd->maxports,
+ TTY_DRIVER_REAL_RAW |
+ TTY_DRIVER_DYNAMIC_DEV |
+ TTY_DRIVER_HARDWARE_BREAK);
 
-   brd->serial_driver->magic = TTY_DRIVER_MAGIC;
+   if (IS_ERR(brd->serial_driver))
+   return PTR_ERR(brd->serial_driver);
 
snprintf(brd->SerialName, MAXTTYNAMELEN, "tty_dgnc_%d_", brd->boardnum);
 
@@ -186,31 +192,10 @@ int dgnc_tty_register(struct dgnc_board *brd)
brd->serial_driver->name_base = 0;
brd->serial_driver->major = 0;
brd->serial_driver->minor_start = 0;
-   brd->serial_driver->num = brd->maxports;
brd->serial_driver->type = TTY_DRIVER_TYPE_SERIAL;
brd->serial_driver->subtype = SERIAL_TYPE_NORMAL;
brd->serial_driver->init_termios = DgncDefaultTermios;
brd->serial_driver->driver_name = DRVSTR;
-   brd->serial_driver->flags = (TTY_DRIVER_REAL_RAW |
-  TTY_DRIVER_DYNAMIC_DEV |
-  TTY_DRIVER_HARDWARE_BREAK);
-
-   /*
-* The kernel wants space to store pointers to
-* tty_struct's and termios's.
-*/
-   brd->serial_driver->ttys = kcalloc(brd->maxports,
-sizeof(*brd->serial_driver->ttys),
-GFP_KERNEL);
-   if (!brd->serial_driver->ttys)
-   return -ENOMEM;
-
-   kref_init(&brd->serial_driver->kref);
-   brd->serial_driver->termios = kcalloc(brd->maxports,
-   
sizeof(*brd->serial_driver->termios),
-   GFP_KERNEL);
-   if (!brd->serial_driver->termios)
-   return -ENOMEM;
 
/*
 * Entry points for driver.  Called by the kernel from
@@ -224,7 +209,7 @@ int dgnc_tty_register(struct dgnc_board *brd)
if (rc < 0) {
dev_dbg(&brd->pdev->dev,
"Can't register tty device (%d)\n", rc);
-   return rc;
+   goto free_serial_driver;
}
brd->dgnc_Major_Serial_Registered = true;
}
@@ -234,38 +219,26 @@ int dgnc_tty_register(struct dgnc_board *brd)
 * again, separately so we don't get the LD confused about what major
 * we are when we get into the dgnc_tty_open() routine.
 */
-   brd->print_driver->magic = TTY_DRIVER_MAGIC;
+   brd->print_driver = tty_alloc_driver(brd->maxports,
+TTY_DRIVER_REAL_RAW |
+TTY_DRIVER_DYNAMIC_DEV |
+TTY_DRIVER_HARDWARE_BREAK);
+
+   if (IS_ERR(brd->print_driver)) {
+   rc = PTR_ERR(brd->print_driver);
+   goto unregister_serial_driver;
+   }
+
snprintf(brd->PrintName, MAXTTYNAMELEN, "pr_dgnc_%d_", brd->boardnum);
 
brd->print_driver->name = brd->PrintName;
brd->print_driver->name_base = 0;
brd->print_driver->major = brd->serial_driver->major;
brd->print_driver->minor_start = 0x80;
-   brd->print_driver->num = brd->maxports;
brd->print_driver->type = TTY_DRIVER_TYPE_SERIAL;
brd->print_driver->subtype = SERIAL_TYPE_NORMAL;
brd->print_driver->init_termios = DgncDefaultTermios;
brd->print_driver->driver_name = DRVSTR;
-   brd->print_driver->flags = (TTY_DRIVER_REAL_RAW |
- TTY_DRIVER_DYNAMIC_DEV |
- TTY_DRIVER_HARDWARE_BREAK);
-
-   /*
-* The kernel wants space to store pointers to
-* tty_struct's and termios's.  Must be separated from
-* the Serial Driver so we don't get confused
-*/
-   brd->print_driver->ttys = kcalloc(brd->maxports,
-   sizeof(*brd->print_driver->ttys),
-   GFP_KERNEL);
-   if (!brd->print_driver->ttys)
-   return -ENOMEM;
-   kref_init(&brd->print_driver->kref);
-   brd->print_driver->termios = kcalloc(brd->maxpo