summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorAlex Dubov <oakad@yahoo.com>2007-04-12 17:05:26 +1000
committerPierre Ossman <drzeus@drzeus.cx>2007-05-01 13:04:15 +0200
commit91f8d0118a0e1f25f809f3fde5a7616a1eaabc2b (patch)
tree9388456276e9384e190d88f7ef8e229768d9362e /drivers/misc
parent13cdf48ef15befbd36f8295091b9e0f9bd322963 (diff)
tifm: layout fixes, small changes to comments and printfs
Cosmetic changes to the code. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/tifm_7xx1.c10
-rw-r--r--drivers/misc/tifm_core.c24
2 files changed, 15 insertions, 19 deletions
diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c
index eafa5575f312..9dcff14e752c 100644
--- a/drivers/misc/tifm_7xx1.c
+++ b/drivers/misc/tifm_7xx1.c
@@ -10,8 +10,6 @@
*/
#include <linux/tifm.h>
-#include <linux/dma-mapping.h>
-#include <linux/freezer.h>
#define DRIVER_NAME "tifm_7xx1"
#define DRIVER_VERSION "0.8"
@@ -41,8 +39,7 @@ static irqreturn_t tifm_7xx1_isr(int irq, void *dev_id)
{
struct tifm_adapter *fm = dev_id;
struct tifm_dev *sock;
- unsigned int irq_status;
- unsigned int cnt;
+ unsigned int irq_status, cnt;
spin_lock(&fm->lock);
irq_status = readl(fm->addr + FM_INTERRUPT_STATUS);
@@ -134,11 +131,10 @@ static void tifm_7xx1_switch_media(struct work_struct *work)
{
struct tifm_adapter *fm = container_of(work, struct tifm_adapter,
media_switcher);
+ struct tifm_dev *sock;
unsigned long flags;
unsigned char media_id;
- int cnt;
- struct tifm_dev *sock;
- unsigned int socket_change_set;
+ unsigned int socket_change_set, cnt;
spin_lock_irqsave(&fm->lock, flags);
socket_change_set = fm->socket_change_set;
diff --git a/drivers/misc/tifm_core.c b/drivers/misc/tifm_core.c
index 70220beb3e04..d195fb088f4a 100644
--- a/drivers/misc/tifm_core.c
+++ b/drivers/misc/tifm_core.c
@@ -115,23 +115,23 @@ static int tifm_device_remove(struct device *dev)
static int tifm_device_suspend(struct device *dev, pm_message_t state)
{
- struct tifm_dev *fm_dev = container_of(dev, struct tifm_dev, dev);
+ struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev);
struct tifm_driver *drv = container_of(dev->driver, struct tifm_driver,
driver);
if (dev->driver && drv->suspend)
- return drv->suspend(fm_dev, state);
+ return drv->suspend(sock, state);
return 0;
}
static int tifm_device_resume(struct device *dev)
{
- struct tifm_dev *fm_dev = container_of(dev, struct tifm_dev, dev);
+ struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev);
struct tifm_driver *drv = container_of(dev->driver, struct tifm_driver,
driver);
if (dev->driver && drv->resume)
- return drv->resume(fm_dev);
+ return drv->resume(sock);
return 0;
}
@@ -155,14 +155,14 @@ static struct device_attribute tifm_dev_attrs[] = {
};
static struct bus_type tifm_bus_type = {
- .name = "tifm",
- .dev_attrs = tifm_dev_attrs,
- .match = tifm_bus_match,
- .uevent = tifm_uevent,
- .probe = tifm_device_probe,
- .remove = tifm_device_remove,
- .suspend = tifm_device_suspend,
- .resume = tifm_device_resume
+ .name = "tifm",
+ .dev_attrs = tifm_dev_attrs,
+ .match = tifm_bus_match,
+ .uevent = tifm_uevent,
+ .probe = tifm_device_probe,
+ .remove = tifm_device_remove,
+ .suspend = tifm_device_suspend,
+ .resume = tifm_device_resume
};
static void tifm_free(struct class_device *cdev)