Commit 9ce8540c authored by Adrian Bunk's avatar Adrian Bunk Committed by Greg Kroah-Hartman

USB: ftdi-elan.c: fixes and cleanups

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: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 27a3de4c
...@@ -205,11 +205,7 @@ struct u132 { ...@@ -205,11 +205,7 @@ struct u132 {
struct u132_port port[MAX_U132_PORTS]; struct u132_port port[MAX_U132_PORTS];
struct u132_endp *endp[MAX_U132_ENDPS]; 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!! * these can not be inlines because we need the structure offset!!
* Does anyone have a better way????? * Does anyone have a better way?????
......
...@@ -303,7 +303,7 @@ void ftdi_elan_gone_away(struct platform_device *pdev) ...@@ -303,7 +303,7 @@ void ftdi_elan_gone_away(struct platform_device *pdev)
EXPORT_SYMBOL_GPL(ftdi_elan_gone_away); 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; dev->parent = NULL;
} }
...@@ -1426,14 +1426,6 @@ static int ftdi_elan_read_reg(struct usb_ftdi *ftdi, u32 *data) ...@@ -1426,14 +1426,6 @@ static int ftdi_elan_read_reg(struct usb_ftdi *ftdi, u32 *data)
} }
} }
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, static int ftdi_elan_read_config(struct usb_ftdi *ftdi, int config_offset,
u8 width, u32 *data) u8 width, u32 *data)
{ {
......
...@@ -95,3 +95,7 @@ int usb_ftdi_elan_edset_setup(struct platform_device *pdev, u8 ed_number, ...@@ -95,3 +95,7 @@ int usb_ftdi_elan_edset_setup(struct platform_device *pdev, u8 ed_number,
int halted, int skipped, int actual, int non_null)); int halted, int skipped, int actual, int non_null));
int usb_ftdi_elan_edset_flush(struct platform_device *pdev, u8 ed_number, int usb_ftdi_elan_edset_flush(struct platform_device *pdev, u8 ed_number,
void *endp); 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);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment