Skip to contentSkip to conversation

staging: ft1000-pcmcia: get rid of ft1000_dev.h

PATCH New Ondrej Zary 1 participant 1 message Jun 22, 2011 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 2/15 staging: ft1000-pcmcia: get rid of ft1000_dev.h

Shorten ft1000_read_reg() to single line and move it to ft1000.h along with ft1000_write_reg() and delete ft1000_dev.h

drivers/staging/ft1000/ft1000-pcmcia/ft1000.h +10 -0
@@ -406,4 +406,14 @@ extern u16 ft1000_read_dpram_mag_16 (struct net_device *dev, int offset, int Ind
 extern u32 ft1000_read_dpram_mag_32 (struct net_device *dev, int offset);
 void ft1000_write_dpram_mag_32 (struct net_device *dev, int offset, u32 value);
 
+/* Read the value of a given ASIC register. */
+static inline u16 ft1000_read_reg (struct net_device *dev, u16 offset) {
+    return inw(dev->base_addr + offset);
+}
+
+/* Set the value of a given ASIC register. */
+static inline void ft1000_write_reg (struct net_device *dev, u16 offset, u16 value) {
+    outw(value, dev->base_addr + offset);
+}
+
 #endif // _FT1000H_
drivers/staging/ft1000/ft1000-pcmcia/ft1000_dev.h deleted +0 -66

66 lines not on this page · raw message

drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c +0 -1
@@ -34,7 +34,6 @@
 #include <asm/uaccess.h>
 #include <linux/vmalloc.h>
 
-#include "ft1000_dev.h"
 #include "ft1000.h"
 #include "boot.h"
 
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +0 -1
@@ -54,7 +54,6 @@
 #endif
 
 #include <linux/delay.h>
-#include "ft1000_dev.h"
 #include "ft1000.h"
 
 int card_download(struct net_device *dev, const u8 *pFileStart, UINT FileLength);
Signature · 1 line
Ondrej Zary