public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Tony Olech <tony.olech@elandigitalsystems.com>
Cc: gregkh@suse.de, linux-usb-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/usb/misc/ftdi-elan.c: fixes and cleanups
Date: Mon, 20 Nov 2006 03:24:44 +0100	[thread overview]
Message-ID: <20061120022444.GT31879@stusta.de> (raw)

This patch contains the following possible cleanups:
- make the needlessly global ftdi_release_platform_dev() static
- remove the unused usb_ftdi_elan_read_reg()
- proper prototypes for the following functions:
  - usb_ftdi_elan_read_pcimem()
  - usb_ftdi_elan_write_pcimem()

Note that the misplaced prototypes for the latter ones in 
drivers/usb/host/u132-hcd.c were buggy. Depending on the calling 
convention of the architecture calling one of them could have turned 
your stack into garbage.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/usb/host/u132-hcd.c  |    6 +-----
 drivers/usb/misc/ftdi-elan.c |   10 +---------
 drivers/usb/misc/usb_u132.h  |    4 ++++
 3 files changed, 6 insertions(+), 14 deletions(-)

--- linux-2.6.19-rc5-mm2/drivers/usb/misc/ftdi-elan.c.old	2006-11-20 01:09:28.000000000 +0100
+++ linux-2.6.19-rc5-mm2/drivers/usb/misc/ftdi-elan.c	2006-11-20 01:09:51.000000000 +0100
@@ -303,7 +303,7 @@
 
 
 EXPORT_SYMBOL_GPL(ftdi_elan_gone_away);
-void ftdi_release_platform_dev(struct device *dev)
+static void ftdi_release_platform_dev(struct device *dev)
 {
         dev->parent = NULL;
 }
@@ -1426,14 +1426,6 @@
         }
 }
 
-int usb_ftdi_elan_read_reg(struct platform_device *pdev, u32 *data)
-{
-        struct usb_ftdi *ftdi = platform_device_to_usb_ftdi(pdev);
-        return ftdi_elan_read_reg(ftdi, data);
-}
-
-
-EXPORT_SYMBOL_GPL(usb_ftdi_elan_read_reg);
 static int ftdi_elan_read_config(struct usb_ftdi *ftdi, int config_offset,
         u8 width, u32 *data)
 {
--- linux-2.6.19-rc5-mm2/drivers/usb/misc/usb_u132.h.old	2006-11-20 02:41:07.000000000 +0100
+++ linux-2.6.19-rc5-mm2/drivers/usb/misc/usb_u132.h	2006-11-20 02:49:00.000000000 +0100
@@ -95,3 +95,7 @@
          int halted, int skipped, int actual, int non_null));
 int usb_ftdi_elan_edset_flush(struct platform_device *pdev, u8 ed_number,
         void *endp);
+int usb_ftdi_elan_read_pcimem(struct platform_device *pdev, int mem_offset,
+			      u8 width, u32 *data);
+int usb_ftdi_elan_write_pcimem(struct platform_device *pdev, int mem_offset,
+			       u8 width, u32 data);
--- linux-2.6.19-rc5-mm2/drivers/usb/host/u132-hcd.c.old	2006-11-20 01:09:58.000000000 +0100
+++ linux-2.6.19-rc5-mm2/drivers/usb/host/u132-hcd.c	2006-11-20 02:42:24.000000000 +0100
@@ -205,11 +205,7 @@
         struct u132_port port[MAX_U132_PORTS];
         struct u132_endp *endp[MAX_U132_ENDPS];
 };
-int usb_ftdi_elan_read_reg(struct platform_device *pdev, u32 *data);
-int usb_ftdi_elan_read_pcimem(struct platform_device *pdev, u8 addressofs,
-        u8 width, u32 *data);
-int usb_ftdi_elan_write_pcimem(struct platform_device *pdev, u8 addressofs,
-        u8 width, u32 data);
+
 /*
 * these can not be inlines because we need the structure offset!!
 * Does anyone have a better way?????


                 reply	other threads:[~2006-11-20  2:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061120022444.GT31879@stusta.de \
    --to=bunk@stusta.de \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=tony.olech@elandigitalsystems.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox