DVB:Siano drivers - Update module name string to contain module version
PATCH 2/17 DVB:Siano drivers - Update module name string to contain module version
Hi,
This patch step adds version to module name string for all modules.
Thanks,
Doron Cohen
-----------------------
Quoted 1 line
From
81a55103537fb6df2b487819aa9a5af28a5c4bd2Mon Sep 17 00:00:00 2001
From: Doron Cohen <[email protected]>
Date: Wed, 14 Sep 2011 13:33:20 +0300
Subject: [PATCH 03/21] Add smsspi driver to support Siano SPI connected device using SPI generic driver
modified: drivers/media/dvb/siano/Makefile modified: drivers/media/dvb/siano/smscoreapi.c new file: drivers/media/dvb/siano/smsdbg_prn.h modified: drivers/media/dvb/siano/smsspidrv.c modified: drivers/media/dvb/siano/smsspiphy.c --- drivers/media/dvb/siano/Makefile | 2 + drivers/media/dvb/siano/smscoreapi.c | 2 +- drivers/media/dvb/siano/smsdbg_prn.h | 56 ++++++++++++++++++++++++++++++++++ drivers/media/dvb/siano/smsspidrv.c | 33 +++++++++++++++----- drivers/media/dvb/siano/smsspiphy.c | 40 ++++++++---------------- 5 files changed, 97 insertions(+), 36 deletions(-) create mode 100644 drivers/media/dvb/siano/smsdbg_prn.h
(quoted diff) +0 -0
b/drivers/media/dvb/siano/Makefile
index c54140b..affaf01 100644
drivers/media/dvb/siano/Makefile +2 -0
@@ -1,9 +1,11 @@ smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o +smsspi-objs := smsspicommon.o smsspidrv.o smsspiphy.o obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o obj-$(CONFIG_SMS_USB_DRV) += smsusb.o obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o +obj-$(CONFIG_SMS_SPI_DRV) += smsspi.o EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
(quoted diff) +0 -0
b/drivers/media/dvb/siano/smscoreapi.c
index 78765ed..239f453 100644
drivers/media/dvb/siano/smscoreapi.c +1 -1
@@ -39,7 +39,7 @@#include "smsir.h" #include "smsendian.h" -static int sms_dbg; +int sms_dbg;module_param_named (debug, sms_dbg, int,0644 );MODULE_PARM_DESC (debug,"set debug level (info=1, adv=2 (or-able))" );
(quoted diff) +0 -0
b/drivers/media/dvb/siano/smsdbg_prn.h
new file mode 100644
index 0000000..ea157da
drivers/media/dvb/siano/smsdbg_prn.h new file +29 -0
@@ -0,0 +1,56 @@ +/**************************************************************** + +Siano Mobile Silicon, Inc. +MDTV receiver kernel modules. +Copyright (C) 2006-2008, Uri Shkolnik + +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 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; 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, see <http://www.gnu.org/licenses/>. + +****************************************************************/ + +#ifndef _SMS_DBG_H_ +#define _SMS_DBG_H_ + +#include <linux/kernel.h> +#include <linux/module.h> + +/************************************************************************/ +/* Debug Zones definitions.
*/ +/************************************************************************/ +#undef PERROR
+# define PERROR(fmt, args...) \
+ printk(KERN_ERR "spibus error: line %d- %s(): " fmt, __LINE__,\
+ __func__, ## args)
+#undef PWARNING
+# define PWARNING(fmt, args...) \
+ printk(KERN_WARNING "spibus warning: line %d- %s(): " fmt, __LINE__,
\
+ __func__, ## args)
+
+/* the debug macro - conditional compilation from the makefile */
+#undef PDEBUG /* undef it, just in case */
+#ifdef SPIBUS_DEBUG
+# define PDEBUG(fmt, args...) \
+ printk(KERN_DEBUG "spibus: line %d- %s(): " fmt, __LINE__, \
+ __func__, ## args)
+#else
+# define PDEBUG(fmt, args...) /* not debugging: nothing */
+#endif
+
+/* The following defines are used for printing and
+are mandatory for compilation. */
+#define TXT(str) str
+#define PRN_DBG(str) PDEBUG str
+#define PRN_ERR(str) PERROR str
+
+#endif /*_SMS_DBG_H_*/
(quoted diff) +0 -0
b/drivers/media/dvb/siano/smsspidrv.c
index 35cce42..fa80c1a 100644
drivers/media/dvb/siano/smsspidrv.c +1 -0
@@ -79,18 +79,27 @@ struct _Msg {struct _spi_device_st *spi_dev; +int sms_dbg;static void spi_worker_thread (void *arg); static DECLARE_WORK(spi_work_queue, (void *)spi_worker_thread);static u8 smsspi_preamble[] = {0xa5 ,0x5a ,0xe7 ,0x7e };static u8 smsspi_startup[] = {0 ,0 ,0xde ,0xc1 ,0xa5 ,0x51 ,0xf1 ,
0xed };
+static u32 sms_intr_pin = SMS_INTR_PIN;
+extern u32 host_intr_pin;
+
static u32 default_type = SMS_NOVA_B0;
-static u32 intr_pin = SMS_INTR_PIN;
-module_param(default_type, int, 0644); -MODULE_PARM_DESC(default_type, "default board type."); +module_param_named(debug, sms_dbg, int, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))"); +
+module_param(default_type, int, S_IRUGO); +MODULE_PARM_DESC(default_type, "default SMS device type."); +
+module_param(sms_intr_pin, int, S_IRUGO); +MODULE_PARM_DESC(sms_intr_pin, "interrupt pin number used by SMS chip for interrupting host.");
-module_param(intr_pin, int, 0644); -MODULE_PARM_DESC(intr_pin, "interrupt pin number."); +module_param(host_intr_pin, int, S_IRUGO); +MODULE_PARM_DESC(host_intr_pin, "interrupt pin number used by Host to be interrupted by SMS.");
/******************************************/ static void spi_worker_thread(void *arg)
@@ -212,7 +221,7 @@ static int smsspi_preload(void *context)
{
MSG_SMS_SPI_INT_LINE_SET_REQ, 0, HIF_TASK,
sizeof(struct _Msg), 0}, {
- 0, intr_pin, 0}
+ 0, sms_intr_pin, 0}
};
int rc;
@@ -333,7 +342,7 @@ static struct platform_device smsspi_device = {
},
};
-int smsspi_register(void)
+static int __init smsspi_module_init(void)
{
struct smsdevice_params_t params;
int ret;
@@ -438,7 +447,7 @@ txbuf_error:
return ret;
}
-void smsspi_unregister(void)
+static void __exit smsspi_module_exit(void)
{
struct _spi_device_st *spi_device = spi_dev; sms_info("entering\n");
@@ -453,3 +462,11 @@ void smsspi_unregister(void)
platform_device_unregister(&smsspi_device); sms_info("exiting\n");
}
+
+
+module_init(smsspi_module_init); +module_exit(smsspi_module_exit);
+
+MODULE_DESCRIPTION("Siano MDTV SPI device driver"); +MODULE_AUTHOR("Siano Mobile Silicon, Inc. ([email protected])"); +MODULE_LICENSE("GPL");
(quoted diff) +0 -0
b/drivers/media/dvb/siano/smsspiphy.c
index 9b8cb14..708ee06 100644
drivers/media/dvb/siano/smsspiphy.c +7 -2
@@ -4,6 +4,7 @@#include <linux/dma-mapping.h> #include <linux/irq.h> #include <linux/interrupt.h> +//#include <linux/timer.h> #include "smscoreapi.h"
@@ -13,6 +14,12 @@#define MAX_SPEED_DURING_DOWNLOAD 6000000#define MAX_SPEED_DURING_WORK 6000000#define SPI_PACKET_SIZE 256 +extern int sms_dbg; + +int sms_spi_interrupt =135 ; +module_param_named (debug, sms_spi_interrupt, int,0644 ); +MODULE_PARM_DESC (debug,"set interrupt gpio pin for spi device." ); +int spi_max_speed =MAX_SPEED_DURING_WORK ;
@@ -23,8 +30,6 @@ struct sms_spi {int bus_speed;void (*interruptHandler) (void *);void *intr_context; -// struct timer_list timer; -// int timer_interval; };/*!
@@ -141,9 +146,6 @@ void smsspibus_xfer(void *context, unsigned char
*txbuf,
-
-
-
void *smsspiphy_init(void *context, void (*smsspi_interruptHandler)
(void *),
void *intr_context)
{
@@ -163,9 +165,7 @@ void *smsspiphy_init(void *context, void (*smsspi_interruptHandler) (void *),
.mode = SPI_MODE_0,
};
-
- printk(KERN_INFO "sms_debug = %d\n", sms_debug);
-
+ sms_err("sms_debug = %d\n", sms_dbg);
sms_device = spi_new_device(master, &sms_chip); if (!sms_device)
@@ -191,36 +191,22 @@ void *smsspiphy_init(void *context, void (*smsspi_interruptHandler) (void *),
return NULL;
}
memset (sms_spi->zero_txbuf, 0, SPI_PACKET_SIZE);
-// setup_timer(&sms_spi->timer, timer_function, (unsigned
long)sms_spi);
sms_spi->interruptHandler = smsspi_interruptHandler; sms_spi->intr_context = intr_context;
-
-
-
-
-
- if ((gpio_request(135, "SMSSPI") == 0) &&
- (gpio_direction_input(135) == 0)) {
- gpio_export(135, 0);
+ if ((gpio_request(sms_spi_interrupt, "SMSSPI") == 0) &&
+ (gpio_direction_input(sms_spi_interrupt) == 0)) {
+ gpio_export(sms_spi_interrupt, 0);
}
-
- set_irq_type(gpio_to_irq(135), IRQ_TYPE_EDGE_FALLING);
- ret = request_irq(gpio_to_irq(135), spibus_interrupt,IRQF_TRIGGER_FALLING, "SMSSPI", sms_spi);
+ irq_set_irq_type(gpio_to_irq(sms_spi_interrupt),IRQ_TYPE_EDGE_FALLING);
+ ret = request_irq(gpio_to_irq(sms_spi_interrupt), spibus_interrupt,IRQF_TRIGGER_FALLING, "SMSSPI", sms_spi);
if (ret) {
sms_err("Could not get interrupt for SMS device. status =%d\n", ret); return NULL;
}
-
-
-
-
-
-
-// sms_spi->timer_interval = 1000;
sms_spi->spi_dev = sms_device;
sms_spi->bus_speed = spi_max_speed;
sms_err ("after init sms_spi=0x%x, spi_dev = 0x%x", (int)sms_spi,
(int)sms_spi->spi_dev);
Signature · 1 line
1.7.4.1
Quoted 1 line
From
0893c7299081a5366853f7c7aefe48aebee232a5Mon Sep 17 00:00:00 2001
From: Doron Cohen <[email protected]>
Date: Thu, 15 Sep 2011 11:38:53 +0300
Subject: [PATCH 04/21] Add version number to all siano modules description line.
--- drivers/media/dvb/siano/smscoreapi.c | 6 ++++-- drivers/media/dvb/siano/smscoreapi.h | 11 +++++++++++ drivers/media/dvb/siano/smsspidrv.c | 6 ++++-- drivers/media/dvb/siano/smsusb.c | 6 ++++-- 4 files changed, 23 insertions(+), 6 deletions(-)
(quoted diff) +0 -0
b/drivers/media/dvb/siano/smscoreapi.c
index 239f453..115604c 100644
drivers/media/dvb/siano/smscoreapi.c +4 -2
@@ -1639,6 +1639,8 @@ static void __exit smscore_module_exit(void)module_init (smscore_module_init);module_exit (smscore_module_exit); -MODULE_DESCRIPTION ("Siano MDTV Core module" ); -MODULE_AUTHOR ("Siano Mobile Silicon, Inc. ([email protected])" ); +#define MODULE_VERSION_STRING "Siano MDTV module "VERSION_STRING + +MODULE_DESCRIPTION (MODULE_VERSION_STRING ); +MODULE_AUTHOR (MODULE_AUTHOR_STRING );MODULE_LICENSE ("GPL" );
(quoted diff) +0 -0
b/drivers/media/dvb/siano/smscoreapi.h
index 8ecadec..f700fa2 100644
drivers/media/dvb/siano/smscoreapi.h +0 -0
@@ -36,6 +36,17 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>.
#include "smsir.h"
+
+#define MAJOR_VERSION 2
+#define MINOR_VERSION 3
+#define SUB_VERSION 0
+
+#define STRINGIZE2(z) #z
+#define STRINGIZE(z) STRINGIZE2(z)
+
+#define VERSION_STRING "Version: " STRINGIZE(MAJOR_VERSION) "." STRINGIZE(MINOR_VERSION) "." STRINGIZE(SUB_VERSION) +#define MODULE_AUTHOR_STRING "Siano Mobile Silicon, Inc. ([email protected])"
+
#define kmutex_init(_p_) mutex_init(_p_)
#define kmutex_lock(_p_) mutex_lock(_p_)
#define kmutex_trylock(_p_) mutex_trylock(_p_)
(quoted diff) +0 -0
b/drivers/media/dvb/siano/smsspidrv.c
index fa80c1a..3271e7c 100644
drivers/media/dvb/siano/smsspidrv.c +1 -2
@@ -467,6 +467,8 @@ static void __exit smsspi_module_exit(void)module_init (smsspi_module_init);module_exit (smsspi_module_exit); -MODULE_DESCRIPTION ("Siano MDTV SPI device driver" ); -MODULE_AUTHOR ("Siano Mobile Silicon, Inc. ([email protected])" ); +#define MODULE_VERSION_STRING "Siano SMSXXXX SPI device driver
"VERSION_STRING
+
+MODULE_DESCRIPTION(MODULE_VERSION_STRING);
+MODULE_AUTHOR(MODULE_AUTHOR_STRING);
MODULE_LICENSE("GPL");
(quoted diff) +0 -0
b/drivers/media/dvb/siano/smsusb.c
index 0b8da57..0b6857f 100644
drivers/media/dvb/siano/smsusb.c +1 -2
@@ -578,6 +578,8 @@ static void __exit smsusb_module_exit(void)module_init (smsusb_module_init);module_exit (smsusb_module_exit); -MODULE_DESCRIPTION ("Driver for the Siano SMS1xxx USB dongle" ); -MODULE_AUTHOR ("Siano Mobile Silicon, INC. ([email protected])" ); +#define MODULE_VERSION_STRING "Driver for the Siano SMS1xxx USB dongle
"VERSION_STRING
+
+MODULE_DESCRIPTION(MODULE_VERSION_STRING); +MODULE_AUTHOR("Siano Mobile Silicon, INC. ([email protected])");
MODULE_LICENSE("GPL");
Signature · 1 line
1.7.4.1
Em 20-09-2011 07:30, Doron Cohen escreveu:
Quoted 22 lines
Hi,
This patch step adds version to module name string for all modules.Thanks,
Doron Cohen-----------------------
Quoted 1 line
From
81a55103537fb6df2b487819aa9a5af28a5c4bd2Mon Sep 17 00:00:00 2001From: Doron Cohen <[email protected]>
Date: Wed, 14 Sep 2011 13:33:20 +0300
Subject: [PATCH 03/21] Add smsspi driver to support Siano SPI connected device using SPI generic drivermodified: drivers/media/dvb/siano/Makefile modified: drivers/media/dvb/siano/smscoreapi.c new file: drivers/media/dvb/siano/smsdbg_prn.h modified: drivers/media/dvb/siano/smsspidrv.c modified: drivers/media/dvb/siano/smsspiphy.c --- drivers/media/dvb/siano/Makefile | 2 + drivers/media/dvb/siano/smscoreapi.c | 2 +- drivers/media/dvb/siano/smsdbg_prn.h | 56
Quoted 1 line
++++++++++++++++++++++++++++++++++
Patch is also mangled by your emailer.
Quoted 288 lines
drivers/media/dvb/siano/smsspidrv.c | 33 +++++++++++++++----- drivers/media/dvb/siano/smsspiphy.c | 40 ++++++++---------------- 5 files changed, 97 insertions(+), 36 deletions(-) create mode 100644 drivers/media/dvb/siano/smsdbg_prn.hdrivers/media/dvb/siano/Makefile +2
-0@@ -1,9 +1,11 @@ smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o +smsspi-objs := smsspicommon.o smsspidrv.o smsspiphy.o obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o obj-$(CONFIG_SMS_USB_DRV) += smsusb.o obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o +obj-$(CONFIG_SMS_SPI_DRV) += smsspi.o EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-coredrivers/media/dvb/siano/smscoreapi.c +1
-1@@ -39,7 +39,7 @@#include "smsir.h" #include "smsendian.h" -static int sms_dbg; +int sms_dbg;module_param_named (debug, sms_dbg, int,0644 );MODULE_PARM_DESC (debug,"set debug level (info=1, adv=2 (or-able))" );drivers/media/dvb/siano/smsdbg_prn.h new file +29
-0@@ -0,0 +1,56 @@ +/**************************************************************** + +Siano Mobile Silicon, Inc. +MDTV receiver kernel modules. +Copyright (C) 2006-2008, Uri Shkolnik + +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 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; 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, see <http://www.gnu.org/licenses/>. + +****************************************************************/ + +#ifndef _SMS_DBG_H_ +#define _SMS_DBG_H_ + +#include <linux/kernel.h> +#include <linux/module.h> + +/************************************************************************/ +/* Debug Zones definitions. */
drivers/media/dvb/siano/smsdbg_prn.h new file +8
-0+/************************************************************************/ +#undef PERROR +# define PERROR(fmt, args...) \ + printk(KERN_ERR "spibus error: line %d- %s(): " fmt, __LINE__,\ + __func__, ## args) +#undef PWARNING +# define PWARNING(fmt, args...) \ + printk(KERN_WARNING "spibus warning: line %d- %s(): " fmt, __LINE__,\
drivers/media/dvb/siano/smsdbg_prn.h new file +19
-0+ __func__, ## args) + +/* the debug macro - conditional compilation from the makefile */ +#undef PDEBUG/* undef it, just in case */ +#ifdef SPIBUS_DEBUG +# define PDEBUG(fmt, args...) \ + printk(KERN_DEBUG "spibus: line %d- %s(): " fmt, __LINE__, \ + __func__, ## args) +#else +# define PDEBUG(fmt, args...) /* not debugging: nothing */ +#endif + +/* The following defines are used for printing and +are mandatory for compilation. */ +#define TXT (str) str +#define PRN_DBG (str) PDEBUG str +#define PRN_ERR (str) PERROR str + +#endif /*_SMS_DBG_H_*/ drivers/media/dvb/siano/smsspidrv.c +14
-5@@ -79,18 +79,27 @@ struct _Msg {struct _spi_device_st *spi_dev; +int sms_dbg;static void spi_worker_thread (void *arg); static DECLARE_WORK(spi_work_queue, (void *)spi_worker_thread);static u8 smsspi_preamble[] = {0xa5 ,0x5a ,0xe7 ,0x7e };static u8 smsspi_startup[] = {0 ,0 ,0xde ,0xc1 ,0xa5 ,0x51 ,0xf1 ,0xed }; +static u32 sms_intr_pin =SMS_INTR_PIN ; +extern u32 host_intr_pin; +static u32 default_type =SMS_NOVA_B0 ; -static u32 intr_pin =SMS_INTR_PIN ; -module_param (default_type, int,0644 ); -MODULE_PARM_DESC (default_type,"default board type." ); +module_param_named (debug, sms_dbg, int,S_IRUGO |S_IWUSR ); +MODULE_PARM_DESC (debug,"set debug level (info=1, adv=2 (or-able))" ); + +module_param (default_type, int,S_IRUGO ); +MODULE_PARM_DESC (default_type,"default SMS device type." ); + +module_param (sms_intr_pin, int,S_IRUGO ); +MODULE_PARM_DESC(sms_intr_pin, "interrupt pin number used by SMS chip for interrupting host."); -module_param (intr_pin, int,0644 ); -MODULE_PARM_DESC (intr_pin,"interrupt pin number." ); +module_param (host_intr_pin, int,S_IRUGO ); +MODULE_PARM_DESC(host_intr_pin, "interrupt pin number used by Host to be interrupted by SMS.");/******************************************/
static voidspi_worker_thread(void *arg)drivers/media/dvb/siano/smsspidrv.c +11
-3@@ -212,7 +221,7 @@ static int smsspi_preload(void *context) {MSG_SMS_SPI_INT_LINE_SET_REQ ,0 ,HIF_TASK , sizeof(struct _Msg), 0}, { - 0, intr_pin, 0} + 0, sms_intr_pin, 0} };int rc;@@ -333,7 +342,7 @@ static struct platform_device smsspi_device = { }, }; -int smsspi_register (void ) +static int __init smsspi_module_init (void ) {struct smsdevice_params_t params;int ret;@@ -438,7 +447,7 @@ txbuf_error:return ret; } -void smsspi_unregister (void ) +static void __exit smsspi_module_exit(void) {struct _spi_device_st *spi_device = spi_dev;sms_info ("entering\n" );@@ -453,3 +462,11 @@ void smsspi_unregister(void)platform_device_unregister (&smsspi_device);sms_info ("exiting\n" ); } + + +module_init (smsspi_module_init); +module_exit (smsspi_module_exit); + +MODULE_DESCRIPTION ("Siano MDTV SPI device driver" ); +MODULE_AUTHOR ("Siano Mobile Silicon, Inc. ([email protected])" ); +MODULE_LICENSE ("GPL" );drivers/media/dvb/siano/smsspiphy.c +7
-5@@ -4,6 +4,7 @@#include <linux/dma-mapping.h> #include <linux/irq.h> #include <linux/interrupt.h> +//#include <linux/timer.h> #include "smscoreapi.h" @@ -13,6 +14,12 @@#define MAX_SPEED_DURING_DOWNLOAD 6000000#define MAX_SPEED_DURING_WORK 6000000#define SPI_PACKET_SIZE 256 +extern int sms_dbg; + +int sms_spi_interrupt =135 ; +module_param_named (debug, sms_spi_interrupt, int,0644 ); +MODULE_PARM_DESC (debug,"set interrupt gpio pin for spi device." ); +int spi_max_speed =MAX_SPEED_DURING_WORK ;@@ -23,8 +30,6 @@ struct sms_spi {int bus_speed;void (*interruptHandler) (void *);void *intr_context; -// struct timer_list timer; -// int timer_interval; };/*! @@ -141,9 +146,6 @@ void smsspibus_xfer(void *context, unsigned char *txbuf, - - - void *smsspiphy_init(void *context, void (*smsspi_interruptHandler) (void *),drivers/media/dvb/siano/smsspiphy.c +1
-3void *intr_context) {@@ -163,9 +165,7 @@ void *smsspiphy_init(void *context, void (*smsspi_interruptHandler) (void *), .mode =SPI_MODE_0 , }; - -printk (KERN_INFO "sms_debug = %d\n" , sms_debug); - +sms_err ("sms_debug = %d\n" , sms_dbg); sms_device =spi_new_device (master, &sms_chip);drivers/media/dvb/siano/smsspiphy.c +5
-19if (!sms_device)@@ -191,36 +191,22 @@ void *smsspiphy_init(void *context, void (*smsspi_interruptHandler) (void *), return NULL; }memset (sms_spi->zero_txbuf,0 ,SPI_PACKET_SIZE ); -// setup_timer(&sms_spi->timer, timer_function, (unsigned long)sms_spi); sms_spi->interruptHandler = smsspi_interruptHandler; sms_spi->intr_context = intr_context; - - - - - -if ((gpio_request (135 ,"SMSSPI" ) ==0 ) && - (gpio_direction_input (135 ) ==0 )) { -gpio_export (135 ,0 ); +if ((gpio_request (sms_spi_interrupt,"SMSSPI" ) ==0 ) && + (gpio_direction_input (sms_spi_interrupt) ==0 )) { +gpio_export (sms_spi_interrupt,0 ); } - -set_irq_type (gpio_to_irq (135 ),IRQ_TYPE_EDGE_FALLING ); - ret =request_irq (gpio_to_irq (135 ), spibus_interrupt, IRQF_TRIGGER_FALLING, "SMSSPI", sms_spi); +irq_set_irq_type (gpio_to_irq (sms_spi_interrupt),IRQ_TYPE_EDGE_FALLING ); + ret =request_irq (gpio_to_irq (sms_spi_interrupt), spibus_interrupt,IRQF_TRIGGER_FALLING ,"SMSSPI" , sms_spi);if (ret) {sms_err ("Could not get interrupt for SMS device. status =%d\n" , ret);return NULL ; } - - - - - - -// sms_spi->timer_interval = 1000; sms_spi->spi_dev = sms_device; sms_spi->bus_speed = spi_max_speed; sms_err ("after init sms_spi=0x%x, spi_dev = 0x%x", (int)sms_spi,(int)sms_spi->spi_dev);