[PATCH RFC 14/17] staging: dgap: Merge dgap_sysfs.h into dgap_driver.h

Mark Hounschell markh at compro.net
Wed Feb 12 18:01:28 UTC 2014


Merge dgap_sysfs.h into dgap_driver.h

Signed-off-by: Mark Hounschell <markh at compro.net>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>

diff -urpN linux-3.13.1-orig/drivers/staging/dgap/dgap_driver.c linux-3.13.1-new/drivers/staging/dgap/dgap_driver.c
--- linux-3.13.1-orig/drivers/staging/dgap/dgap_driver.c	2014-02-11 09:13:15.812797508 -0500
+++ linux-3.13.1-new/drivers/staging/dgap/dgap_driver.c	2014-02-11 09:33:16.665283807 -0500
@@ -71,7 +71,6 @@
 
 #include "dgap_driver.h"
 #include "dgap_trace.h"
-#include "dgap_sysfs.h"
 
 #include "dgap_types.h"
 
@@ -202,6 +201,16 @@ static const struct tty_operations dgap_
 	.send_xchar = dgap_tty_send_xchar
 };
 
+/*****************************************************************************
+ * Function prototypes from dgap_sysfs.h
+ *****************************************************************************/
+static void dgap_create_ports_sysfiles(struct board_t *bd);
+static void dgap_remove_ports_sysfiles(struct board_t *bd);
+static void dgap_create_driver_sysfiles(struct pci_driver *);
+static void dgap_remove_driver_sysfiles(struct pci_driver *);
+static void dgap_create_tty_sysfs(struct un_t *un, struct device *c);
+static void dgap_remove_tty_sysfs(struct device *c);
+
 #ifdef DIGI_CONCENTRATORS_SUPPORTED
 static void             dgap_do_conc_load(struct board_t *brd, uchar *uaddr, int len);
 #endif
@@ -7932,7 +7941,7 @@ static ssize_t dgap_driver_pollrate_stor
 static DRIVER_ATTR(pollrate, (S_IRUSR | S_IWUSR), dgap_driver_pollrate_show, dgap_driver_pollrate_store);
 
 
-void dgap_create_driver_sysfiles(struct pci_driver *dgap_driver)
+static void dgap_create_driver_sysfiles(struct pci_driver *dgap_driver)
 {
 	int rc = 0;
 	struct device_driver *driverfs = &dgap_driver->driver;
@@ -7951,7 +7960,7 @@ void dgap_create_driver_sysfiles(struct
 }
 
 
-void dgap_remove_driver_sysfiles(struct pci_driver *dgap_driver)
+static void dgap_remove_driver_sysfiles(struct pci_driver *dgap_driver)
 {
 	struct device_driver *driverfs = &dgap_driver->driver;
 	driver_remove_file(driverfs, &driver_attr_version);
@@ -8161,7 +8170,7 @@ static DEVICE_ATTR(ports_txcount, S_IRUS
 /* this function creates the sys files that will export each signal status
  * to sysfs each value will be put in a separate filename
  */
-void dgap_create_ports_sysfiles(struct board_t *bd)
+static void dgap_create_ports_sysfiles(struct board_t *bd)
 {
 	int rc = 0;
 
@@ -8183,7 +8192,7 @@ void dgap_create_ports_sysfiles(struct b
 
 
 /* removes all the sys files created for that port */
-void dgap_remove_ports_sysfiles(struct board_t *bd)
+static void dgap_remove_ports_sysfiles(struct board_t *bd)
 {
 	device_remove_file(&(bd->pdev->dev), &dev_attr_ports_state);
 	device_remove_file(&(bd->pdev->dev), &dev_attr_ports_baud);
@@ -8582,7 +8591,7 @@ static struct attribute_group dgap_tty_a
 
 
 
-void dgap_create_tty_sysfs(struct un_t *un, struct device *c)
+static void dgap_create_tty_sysfs(struct un_t *un, struct device *c)
 {
 	int ret;
 
@@ -8598,7 +8607,7 @@ void dgap_create_tty_sysfs(struct un_t *
 }
 
 
-void dgap_remove_tty_sysfs(struct device *c)
+static void dgap_remove_tty_sysfs(struct device *c)
 {
 	sysfs_remove_group(&c->kobj, &dgap_tty_attribute_group);
 }
diff -urpN linux-3.13.1-orig/drivers/staging/dgap/dgap_driver.h linux-3.13.1-new/drivers/staging/dgap/dgap_driver.h
--- linux-3.13.1-orig/drivers/staging/dgap/dgap_driver.h	2014-02-11 08:56:53.758605000 -0500
+++ linux-3.13.1-new/drivers/staging/dgap/dgap_driver.h	2014-02-11 09:34:25.247042563 -0500
@@ -34,7 +34,6 @@
 
 #include "dgap_types.h"         /* Additional types needed by the Digi header files */
 #include "dgap_kcompat.h"       /* Kernel 2.4/2.6 compat includes */
-#include "dgap_sysfs.h"		/* Support for SYSFS */
 
 /*************************************************************************
  *
diff -urpN linux-3.13.1-orig/drivers/staging/dgap/dgap_sysfs.h linux-3.13.1-new/drivers/staging/dgap/dgap_sysfs.h
--- linux-3.13.1-orig/drivers/staging/dgap/dgap_sysfs.h	2014-01-29 08:06:37.000000000 -0500
+++ linux-3.13.1-new/drivers/staging/dgap/dgap_sysfs.h	1969-12-31 19:00:00.000000000 -0500
@@ -1,48 +0,0 @@
-/*
- * Copyright 2003 Digi International (www.digi.com)
- *	Scott H Kilau <Scott_Kilau at digi dot com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *	NOTE: THIS IS A SHARED HEADER. DO NOT CHANGE CODING STYLE!!!
- */
-
-#ifndef __DGAP_SYSFS_H
-#define __DGAP_SYSFS_H
-
-#include "dgap_driver.h"
-
-#include <linux/device.h>
-
-struct board_t;
-struct channel_t;
-struct un_t;
-struct pci_driver;
-struct class_device;
-
-extern void dgap_create_ports_sysfiles(struct board_t *bd); 
-extern void dgap_remove_ports_sysfiles(struct board_t *bd);
-
-extern void dgap_create_driver_sysfiles(struct pci_driver *);
-extern void dgap_remove_driver_sysfiles(struct pci_driver *);
-
-extern int dgap_tty_class_init(void);
-extern int dgap_tty_class_destroy(void);
-
-extern void dgap_create_tty_sysfs(struct un_t *un, struct device *c);
-extern void dgap_remove_tty_sysfs(struct device *c);
-
-
-#endif





More information about the devel mailing list