summaryrefslogtreecommitdiffstats
path: root/drivers/staging/dgap/dgap_tty.c
diff options
context:
space:
mode:
authorLidza Louina <lidza.louina@gmail.com>2013-12-19 21:12:12 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-20 08:54:46 -0800
commit0c5b5632d2ecc0e4756deaeed3364b0fdcbd56e3 (patch)
tree418104844911e78bae1baeac2530dae51b8969b2 /drivers/staging/dgap/dgap_tty.c
parentf0dcc9fa42a21d850178b53586f9bd5d6fc94e12 (diff)
staging: dgap: uses kzalloc for allocating memory
Originally, this driver created it's own allocating function. This patch removes that function and calls kzalloc directly. This patch affects: - driver.c - driver.h - fep5.c - tty.c Signed-off-by: Lidza Louina <lidza.louina@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgap/dgap_tty.c')
-rw-r--r--drivers/staging/dgap/dgap_tty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c
index c64296f7013..39fb4dfb8b7 100644
--- a/drivers/staging/dgap/dgap_tty.c
+++ b/drivers/staging/dgap/dgap_tty.c
@@ -233,7 +233,7 @@ int dgap_tty_register(struct board_t *brd)
brd->SerialDriver->flags = (TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_HARDWARE_BREAK);
/* The kernel wants space to store pointers to tty_structs */
- brd->SerialDriver->ttys = dgap_driver_kzmalloc(MAXPORTS * sizeof(struct tty_struct *), GFP_KERNEL);
+ brd->SerialDriver->ttys = kzalloc(MAXPORTS * sizeof(struct tty_struct *), GFP_KERNEL);
if (!brd->SerialDriver->ttys)
return(-ENOMEM);
@@ -266,7 +266,7 @@ int dgap_tty_register(struct board_t *brd)
brd->PrintDriver->flags = (TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_HARDWARE_BREAK);
/* The kernel wants space to store pointers to tty_structs */
- brd->PrintDriver->ttys = dgap_driver_kzmalloc(MAXPORTS * sizeof(struct tty_struct *), GFP_KERNEL);
+ brd->PrintDriver->ttys = kzalloc(MAXPORTS * sizeof(struct tty_struct *), GFP_KERNEL);
if (!brd->PrintDriver->ttys)
return(-ENOMEM);
@@ -380,7 +380,7 @@ int dgap_tty_init(struct board_t *brd)
*/
for (i = 0; i < brd->nasync; i++) {
if (!brd->channels[i]) {
- brd->channels[i] = dgap_driver_kzmalloc(sizeof(struct channel_t), GFP_ATOMIC);
+ brd->channels[i] = kzalloc(sizeof(struct channel_t), GFP_ATOMIC);
if (!brd->channels[i]) {
DPR_CORE(("%s:%d Unable to allocate memory for channel struct\n",
__FILE__, __LINE__));