[PATCH v2] staging: rts5208: use msecs_to_jiffies for timeouts
This is only an API consolidation and should make things more readable Signed-off-by: Nicholas Mc Guire --- v2: typo in patch subject fixed - no change in actual patch Converting milliseconds to jiffies by val * HZ / 1000 is technically not wrong but msecs_to_jiffies(val) is the cleaner solution and handles corner cases correctly. This patch was only compile tested with x86_64_defconfig + CONFIG_STAGING=y, CONFIG_RTS5208=m Patch is against 3.19.0-rc5 -next-20150122 drivers/staging/rts5208/rtsx_transport.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c index 756a968..dab1995 100644 --- a/drivers/staging/rts5208/rtsx_transport.c +++ b/drivers/staging/rts5208/rtsx_transport.c @@ -271,7 +271,7 @@ int rtsx_send_cmd(struct rtsx_chip *chip, u8 card, int timeout) /* Wait for TRANS_OK_INT */ timeleft = wait_for_completion_interruptible_timeout( - &trans_done, timeout * HZ / 1000); + &trans_done, msecs_to_jiffies(timeout)); if (timeleft <= 0) { dev_dbg(rtsx_dev(chip), "chip->int_reg = 0x%x\n", chip->int_reg); @@ -431,7 +431,7 @@ static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card, spin_unlock_irq(&rtsx->reg_lock); timeleft = wait_for_completion_interruptible_timeout( - &trans_done, timeout * HZ / 1000); + &trans_done, msecs_to_jiffies(timeout)); if (timeleft <= 0) { dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n", __func__, __LINE__); @@ -455,7 +455,7 @@ static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card, init_completion(&trans_done); spin_unlock_irq(&rtsx->reg_lock); timeleft = wait_for_completion_interruptible_timeout( - &trans_done, timeout * HZ / 1000); + &trans_done, msecs_to_jiffies(timeout)); if (timeleft <= 0) { dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n", __func__, __LINE__); @@ -575,7 +575,7 @@ static int rtsx_transfer_sglist_adma(struct rtsx_chip *chip, u8 card, spin_unlock_irq(&rtsx->reg_lock); timeleft = wait_for_completion_interruptible_timeout( - &trans_done, timeout * HZ / 1000); + &trans_done, msecs_to_jiffies(timeout)); if (timeleft <= 0) { dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n", __func__, __LINE__); @@ -602,7 +602,7 @@ static int rtsx_transfer_sglist_adma(struct rtsx_chip *chip, u8 card, init_completion(&trans_done); spin_unlock_irq(&rtsx->reg_lock); timeleft = wait_for_completion_interruptible_timeout( - &trans_done, timeout * HZ / 1000); + &trans_done, msecs_to_jiffies(timeout)); if (timeleft <= 0) { dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n", __func__, __LINE__); @@ -688,7 +688,7 @@ static int rtsx_transfer_buf(struct rtsx_chip *chip, u8 card, void *buf, /* Wait for TRANS_OK_INT */ timeleft = wait_for_completion_interruptible_timeout( - &trans_done, timeout * HZ / 1000); + &trans_done, msecs_to_jiffies(timeout)); if (timeleft <= 0) { dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n", __func__, __LINE__); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rts5028: use msecs_to_jiffies for timeouts
On 01/22/2015 05:01 PM, Nicholas Mc Guire wrote: > sorry - that was a typo - should this be > resubmitted for traceability or is that not > necessary ? resubmit, thanks. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: staging/dgap/dgap.c:981: bad if test ?
Hi, 2015-01-22 19:14 GMT+09:00 Dan Carpenter : > > On Thu, Jan 22, 2015 at 10:05:53AM +, David Binderman wrote: >> Hello there, >> >> [linux-3.19-rc5/drivers/staging/dgap/dgap.c:981]: (warning) Logical >> disjunction always evaluates to true: conc_type != 65 || conc_type != 66. >> >> Source code is >> >> if (conc_type == 0 || conc_type != CX || >> conc_type != EPC) { >> >> Suggest code rework. > > Thanks. This bug was introduced in: Yes, right. I will fix this bug. The configuration file has a type of "concentrator" and that type has two different modules that are "ccon" and "epc". If configuration file has another type for "concentrator", returns "-1" but it always return an error. Thanks for reporting. regards, Daeseok Youn. > > commit f6aa0164cd3b1c5192e87f5651ec382c3bc3abac > Author: Daeseok Youn > Date: Sat Aug 9 14:38:41 2014 +0900 > > staging: dgap: Simplify to set a concentrator type > > It is same manner with setting a board type. > For example of config file for concentrator, > "conc ccon" or > "conc epcon" > > After allocating a type of "CNODE" then set a type of concentrator. > So remove cases in swith statement, just get a token from string > and set to "conc.type". And also it doesn't need to "conc.v_type". > > Signed-off-by: Daeseok Youn > Signed-off-by: Greg Kroah-Hartman > > Let's CC Daeseok. > > regards, > dan carpenter > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: vt6656: fix Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)
On Wed, Jan 21, 2015 at 01:08:48PM +0200, Heba Aamer wrote: > This patch fixes the following checkpatch.pl warning: > fix Prefer ether_addr_copy() over memcpy() > if the Ethernet addresses are __aligned(2) > > Pahole showed that the 2 structs are aligned to u16 > > struct vnt_mic_hdr { > u8 id; /* 0 1 */ > u8 tx_priority; /* 1 1 */ > u8 mic_addr2[6]; /* 2 6 */ > u8 ccmp_pn[6]; /* 8 6 */ > __be16 payload_len; /*14 2 */ > __be16 hlen; /*16 2 */ > __le16 frame_control;/*18 2 */ > u8 addr1[6]; /*20 6 */ > u8 addr2[6]; /*26 6 */ > u8 addr3[6]; /*32 6 */ > __le16 seq_ctrl; /*38 2 */ > u8 addr4[6]; /*40 6 */ > u16packing; /*46 2 */ > > /* size: 48, cachelines: 1, members: 13 */ > /* last cacheline: 48 bytes */ > }; > > struct ieee80211_hdr { > __le16 frame_control;/* 0 2 */ > __le16 duration_id; /* 2 2 */ > u8 addr1[6]; /* 4 6 */ > u8 addr2[6]; /*10 6 */ > u8 addr3[6]; /*16 6 */ > __le16 seq_ctrl; /*22 2 */ > u8 addr4[6]; /*24 6 */ > > /* size: 30, cachelines: 1, members: 7 */ > /* last cacheline: 30 bytes */ > }; > > Signed-off-by: Heba Aamer Reviewed-by: Aya Mahfouz > --- > drivers/staging/vt6656/rxtx.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c > index bb6a4d4..b74f672 100644 > --- a/drivers/staging/vt6656/rxtx.c > +++ b/drivers/staging/vt6656/rxtx.c > @@ -738,7 +738,7 @@ static void vnt_fill_txkey(struct vnt_usb_send_context > *tx_context, > > mic_hdr->id = 0x59; > mic_hdr->payload_len = cpu_to_be16(payload_len); > - memcpy(mic_hdr->mic_addr2, hdr->addr2, ETH_ALEN); > + ether_addr_copy(mic_hdr->mic_addr2, hdr->addr2); > > ieee80211_get_key_tx_seq(tx_key, &seq); > > -- > 1.7.9.5 > > ___ > devel mailing list > de...@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: vt6655: mac.h: fix space prohibited before that ','
On Mon, Jan 19, 2015 at 02:30:25PM +0200, Mohamed Lotfy Hammad wrote: > This patch fixes the following checkpatch.pl error: > fix space prohibited before that ',' > > Signed-off-by: Mohamed Lotfy Hammad Reviewed-by: Aya Mahfouz > --- > drivers/staging/vt6655/mac.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h > index e1e7e10..4985c63 100644 > --- a/drivers/staging/vt6655/mac.h > +++ b/drivers/staging/vt6655/mac.h > @@ -888,7 +888,7 @@ do { > \ > VNSvOutPortB(dwIoBase + MAC_REG_PAGE1SEL, 1) > > #define MACvReadMIBCounter(dwIoBase, pdwCounter) \ > - VNSvInPortD(dwIoBase + MAC_REG_MIBCNTR , pdwCounter) > + VNSvInPortD(dwIoBase + MAC_REG_MIBCNTR, pdwCounter) > > #define MACvPwrEvntDisable(dwIoBase) \ > VNSvOutPortW(dwIoBase + MAC_REG_WAKEUPEN0, 0x) > -- > 2.1.0 > > ___ > devel mailing list > de...@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: vt6655: fix space prohibited before that ','
On Mon, Jan 19, 2015 at 12:16:30PM +0200, Heba Aamer wrote: > This patch fixes the following checkpatch.pl error: > fix space prohibited before that ',' > > Signed-off-by: Heba Aamer Reviewed-by: Aya Mahfouz > --- > v2: added Signed-off line > > drivers/staging/vt6655/mac.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c > index 63c9c7e..3653a2b 100644 > --- a/drivers/staging/vt6655/mac.c > +++ b/drivers/staging/vt6655/mac.c > @@ -789,7 +789,7 @@ bool MACbPSWakeup(void __iomem *dwIoBase) > > // Check if SyncFlushOK > for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { > - VNSvInPortB(dwIoBase + MAC_REG_PSCTL , &byOrgValue); > + VNSvInPortB(dwIoBase + MAC_REG_PSCTL, &byOrgValue); > if (byOrgValue & PSCTL_WAKEDONE) > break; > } > -- > 1.7.9.5 > > ___ > devel mailing list > de...@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: iio: ad2s1200: Fix sign extension
The line above makes vel a 12-bit quantity (st->rx[] is u8). The intention is to sign-extend vel using bit 11 as the sign bit. But because of C's promotion rules "vel = (vel << 4) >> 4;" is actually a no-op, since vel is promoted to int before the inner shift. sign_extend32 works equally well for 8 and 16 bits types, so use that. Signed-off-by: Rasmus Villemoes --- drivers/staging/iio/resolver/ad2s1200.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/iio/resolver/ad2s1200.c b/drivers/staging/iio/resolver/ad2s1200.c index 017d2f8379b7..c17893b4918c 100644 --- a/drivers/staging/iio/resolver/ad2s1200.c +++ b/drivers/staging/iio/resolver/ad2s1200.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -68,7 +69,7 @@ static int ad2s1200_read_raw(struct iio_dev *indio_dev, break; case IIO_ANGL_VEL: vel = (((s16)(st->rx[0])) << 4) | ((st->rx[1] & 0xF0) >> 4); - vel = (vel << 4) >> 4; + vel = sign_extend32(vel, 11); *val = vel; break; default: -- 2.1.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: dgnc: fix long lines in PCI device table
This patch fixes coding style of PCI device table declaration. Signed-off-by: Krzysztof Adamski --- drivers/staging/dgnc/dgnc_driver.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index f610ae1..f177d3a 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -97,12 +97,12 @@ static uint dgnc_poll_stop; /* Used to tell poller to stop */ static struct timer_list dgnc_poll_timer; -static struct pci_device_id dgnc_pci_tbl[] = { - { DIGI_VID, PCI_DEVICE_CLASSIC_4_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, - { DIGI_VID, PCI_DEVICE_CLASSIC_4_422_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, - { DIGI_VID, PCI_DEVICE_CLASSIC_8_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 }, - { DIGI_VID, PCI_DEVICE_CLASSIC_8_422_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 }, - {0,}/* 0 terminated list. */ +static const struct pci_device_id dgnc_pci_tbl[] = { + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_4_DID), .driver_data = 0}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_4_422_DID), .driver_data = 1}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_8_DID), .driver_data = 2}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_8_422_DID), .driver_data = 3}, + {0,} }; MODULE_DEVICE_TABLE(pci, dgnc_pci_tbl); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: dgnc: fix long lines in PCI device table
On Thu, Jan 22, 2015 at 11:10:58AM -0800, Joe Perches wrote: On Thu, 2015-01-22 at 19:55 +0100, Krzysztof Adamski wrote: This patch fixes coding style of PCI device table declaration. [] diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c [] @@ -98,11 +98,11 @@ static struct timer_list dgnc_poll_timer; static struct pci_device_id dgnc_pci_tbl[] = { const - { DIGI_VID, PCI_DEVICE_CLASSIC_4_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, - { DIGI_VID, PCI_DEVICE_CLASSIC_4_422_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, - { DIGI_VID, PCI_DEVICE_CLASSIC_8_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 }, - { DIGI_VID, PCI_DEVICE_CLASSIC_8_422_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 }, - {0,}/* 0 terminated list. */ + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_4_DID), .driver_data = 0}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_4_422_DID), .driver_data = 1}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_8_DID), .driver_data = 2}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_8_422_DID), .driver_data = 3}, + {0,} Maybe better to keep the alignment of .driver_data + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_4_DID), .driver_data = 0}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_4_422_DID), .driver_data = 1}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_8_DID), .driver_data = 2}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_8_422_DID), .driver_data = 3}, Good idea, looks better this way, I'll resend. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: dgnc: fix long lines in PCI device table
On Thu, 2015-01-22 at 19:55 +0100, Krzysztof Adamski wrote: > This patch fixes coding style of PCI device table declaration. [] > diff --git a/drivers/staging/dgnc/dgnc_driver.c > b/drivers/staging/dgnc/dgnc_driver.c [] > @@ -98,11 +98,11 @@ static struct timer_list dgnc_poll_timer; > > > static struct pci_device_id dgnc_pci_tbl[] = { const > - { DIGI_VID, PCI_DEVICE_CLASSIC_4_DID, PCI_ANY_ID, PCI_ANY_ID, 0, > 0, 0 }, > - { DIGI_VID, PCI_DEVICE_CLASSIC_4_422_DID, PCI_ANY_ID, PCI_ANY_ID, > 0, 0, 1 }, > - { DIGI_VID, PCI_DEVICE_CLASSIC_8_DID, PCI_ANY_ID, PCI_ANY_ID, 0, > 0, 2 }, > - { DIGI_VID, PCI_DEVICE_CLASSIC_8_422_DID, PCI_ANY_ID, PCI_ANY_ID, > 0, 0, 3 }, > - {0,}/* 0 terminated list. */ > + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_4_DID), .driver_data = 0}, > + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_4_422_DID), .driver_data = 1}, > + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_8_DID), .driver_data = 2}, > + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_8_422_DID), .driver_data = 3}, > + {0,} Maybe better to keep the alignment of .driver_data + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_4_DID), .driver_data = 0}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_4_422_DID), .driver_data = 1}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_8_DID), .driver_data = 2}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_8_422_DID), .driver_data = 3}, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
make allyesconfig i386 build failure with next-20150122
make ARCH=i386 allyesconfig fails with drivers/staging/built-in.o: In function `reset': (.text+0x2ae89d): multiple definition of `reset' drivers/isdn/built-in.o:(.text+0x185dc2): first defined here make[1]: *** [drivers/built-in.o] Error 1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH 2/3] Drivers: hv: vmbus: introduce vmbus_acpi_remove
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Wednesday, January 21, 2015 11:02 AM > To: KY Srinivasan; de...@linuxdriverproject.org > Cc: Haiyang Zhang; linux-ker...@vger.kernel.org; Dexuan Cui > Subject: [PATCH 2/3] Drivers: hv: vmbus: introduce vmbus_acpi_remove > > In case we do request_resource() in vmbus_acpi_add() we need to tear it > down to be able to load the driver again. Otherwise the following crash in > oberved when hv_vmbus unload/load sequence is performed on > Generation2 instance: > > [ 38.165701] BUG: unable to handle kernel paging request at a00075a0 > [ 38.166315] IP: [] __request_resource+0x2f/0x50 > [ 38.166315] PGD 1f34067 PUD 1f35063 PMD 3f723067 PTE 0 > [ 38.166315] Oops: [#1] SMP > [ 38.166315] Modules linked in: hv_vmbus(+) [last unloaded: hv_vmbus] > [ 38.166315] CPU: 0 PID: 267 Comm: modprobe Not tainted 3.19.0- > rc5_bug923184+ #486 > [ 38.166315] Hardware name: Microsoft Corporation Virtual Machine/Virtual > Machine, BIOS Hyper-V UEFI Release v1.0 11/26/2012 > [ 38.166315] task: 88003f401cb0 ti: 88003f60c000 task.ti: > 88003f60c000 > [ 38.166315] RIP: 0010:[] [] > __request_resource+0x2f/0x50 > [ 38.166315] RSP: 0018:88003f60fb58 EFLAGS: 00010286 > ... > > Signed-off-by: Vitaly Kuznetsov > --- > drivers/hv/vmbus_drv.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index > 4d6b269..b06cb87 100644 > --- a/drivers/hv/vmbus_drv.c > +++ b/drivers/hv/vmbus_drv.c > @@ -902,6 +902,15 @@ acpi_walk_err: > return ret_val; > } > > +static int vmbus_acpi_remove(struct acpi_device *device) { > + int ret = 0; > + > + if (hyperv_mmio.start && hyperv_mmio.end) > + ret = release_resource(&hyperv_mmio); > + return ret; > +} > + > static const struct acpi_device_id vmbus_acpi_device_ids[] = { > {"VMBUS", 0}, > {"VMBus", 0}, > @@ -914,6 +923,7 @@ static struct acpi_driver vmbus_acpi_driver = { > .ids = vmbus_acpi_device_ids, > .ops = { > .add = vmbus_acpi_add, > + .remove = vmbus_acpi_remove, > }, > }; Vitaly, Jake has sent the following patch that has fixed retrieving of the mmio resources: https://lkml.org/lkml/2015/1/20/876 This patch also deals with the resource cleanup that you have in this patch. Regards, K. Y > > -- > 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: dgnc: fix long lines in PCI device table
This patch fixes coding style of PCI device table declaration. Signed-off-by: Krzysztof Adamski --- drivers/staging/dgnc/dgnc_driver.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index f610ae1..f04a693 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -98,11 +98,11 @@ static struct timer_list dgnc_poll_timer; static struct pci_device_id dgnc_pci_tbl[] = { - { DIGI_VID, PCI_DEVICE_CLASSIC_4_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, - { DIGI_VID, PCI_DEVICE_CLASSIC_4_422_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, - { DIGI_VID, PCI_DEVICE_CLASSIC_8_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 }, - { DIGI_VID, PCI_DEVICE_CLASSIC_8_422_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 }, - {0,}/* 0 terminated list. */ + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_4_DID), .driver_data = 0}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_4_422_DID), .driver_data = 1}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_8_DID), .driver_data = 2}, + {PCI_DEVICE(DIGI_VID, PCI_DEVICE_CLASSIC_8_422_DID), .driver_data = 3}, + {0,} }; MODULE_DEVICE_TABLE(pci, dgnc_pci_tbl); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: fbtft: fbtft-core mark functions static
This fixes sparse warnings like: warning: symbol XXX was not declared. Should it be static? by declaring all local functions static. Signed-off-by: Krzysztof Adamski --- drivers/staging/fbtft/fbtft-core.c | 47 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index 873e2c7..37dcf7e 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -79,7 +79,7 @@ void fbtft_dbg_hex(const struct device *dev, int groupsize, } EXPORT_SYMBOL(fbtft_dbg_hex); -unsigned long fbtft_request_gpios_match(struct fbtft_par *par, +static unsigned long fbtft_request_gpios_match(struct fbtft_par *par, const struct fbtft_gpio *gpio) { int ret; @@ -123,7 +123,7 @@ unsigned long fbtft_request_gpios_match(struct fbtft_par *par, return FBTFT_GPIO_NO_MATCH; } -int fbtft_request_gpios(struct fbtft_par *par) +static int fbtft_request_gpios(struct fbtft_par *par) { struct fbtft_platform_data *pdata = par->pdata; const struct fbtft_gpio *gpio; @@ -249,7 +249,7 @@ static int fbtft_request_gpios_dt(struct fbtft_par *par) #endif #ifdef CONFIG_FB_BACKLIGHT -int fbtft_backlight_update_status(struct backlight_device *bd) +static int fbtft_backlight_update_status(struct backlight_device *bd) { struct fbtft_par *par = bl_get_data(bd); bool polarity = !!(bd->props.state & BL_CORE_DRIVER1); @@ -266,7 +266,7 @@ int fbtft_backlight_update_status(struct backlight_device *bd) return 0; } -int fbtft_backlight_get_brightness(struct backlight_device *bd) +static int fbtft_backlight_get_brightness(struct backlight_device *bd) { return bd->props.brightness; } @@ -337,7 +337,8 @@ void fbtft_unregister_backlight(struct fbtft_par *par) { }; EXPORT_SYMBOL(fbtft_register_backlight); EXPORT_SYMBOL(fbtft_unregister_backlight); -void fbtft_set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye) +static void fbtft_set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, + int ye) { fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par, "%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye); @@ -355,7 +356,7 @@ void fbtft_set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye) } -void fbtft_reset(struct fbtft_par *par) +static void fbtft_reset(struct fbtft_par *par) { if (par->gpio.reset == -1) return; @@ -367,7 +368,8 @@ void fbtft_reset(struct fbtft_par *par) } -void fbtft_update_display(struct fbtft_par *par, unsigned start_line, unsigned end_line) +static void fbtft_update_display(struct fbtft_par *par, unsigned start_line, +unsigned end_line) { size_t offset, len; struct timespec ts_start, ts_end, ts_fps, ts_duration; @@ -445,7 +447,7 @@ void fbtft_update_display(struct fbtft_par *par, unsigned start_line, unsigned e } -void fbtft_mkdirty(struct fb_info *info, int y, int height) +static void fbtft_mkdirty(struct fb_info *info, int y, int height) { struct fbtft_par *par = info->par; struct fb_deferred_io *fbdefio = info->fbdefio; @@ -468,7 +470,7 @@ void fbtft_mkdirty(struct fb_info *info, int y, int height) schedule_delayed_work(&info->deferred_work, fbdefio->delay); } -void fbtft_deferred_io(struct fb_info *info, struct list_head *pagelist) +static void fbtft_deferred_io(struct fb_info *info, struct list_head *pagelist) { struct fbtft_par *par = info->par; unsigned dirty_lines_start, dirty_lines_end; @@ -507,7 +509,8 @@ void fbtft_deferred_io(struct fb_info *info, struct list_head *pagelist) } -void fbtft_fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) +static void fbtft_fb_fillrect(struct fb_info *info, + const struct fb_fillrect *rect) { struct fbtft_par *par = info->par; @@ -519,7 +522,8 @@ void fbtft_fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) par->fbtftops.mkdirty(info, rect->dy, rect->height); } -void fbtft_fb_copyarea(struct fb_info *info, const struct fb_copyarea *area) +static void fbtft_fb_copyarea(struct fb_info *info, + const struct fb_copyarea *area) { struct fbtft_par *par = info->par; @@ -531,7 +535,8 @@ void fbtft_fb_copyarea(struct fb_info *info, const struct fb_copyarea *area) par->fbtftops.mkdirty(info, area->dy, area->height); } -void fbtft_fb_imageblit(struct fb_info *info, const struct fb_image *image) +static void fbtft_fb_imageblit(struct fb_info *info, + const struct fb_image *image) { struct fbtft_par *par = info->par; @@ -543,8 +548,8 @@ void fbtft_fb_imageblit(struct fb_info *info, const struct fb_image *image) par->fbtftops.mkdirty(info, image->dy, image->height); } -ssize_t fbtft_fb_write(s
[PATCH] Drivers: hv: vmbus: rename channel work queues
All channel work queues are named 'hv_vmbus_ctl', this makes them indistinguishable in ps output and makes it hard to link to the corresponding vmbus device. Rename them to hv_vmbus_ctl/N and make vmbus device names match, e.g. now vmbus_1 device is served by hv_vmbus_ctl/1 work queue. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/channel_mgmt.c | 5 - drivers/hv/vmbus_drv.c| 6 ++ include/linux/hyperv.h| 3 +++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 0141a3d..b7be96f 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -139,19 +139,22 @@ EXPORT_SYMBOL_GPL(vmbus_prep_negotiate_resp); */ static struct vmbus_channel *alloc_channel(void) { + static atomic_t chan_num = ATOMIC_INIT(0); struct vmbus_channel *channel; channel = kzalloc(sizeof(*channel), GFP_ATOMIC); if (!channel) return NULL; + channel->id = atomic_inc_return(&chan_num); spin_lock_init(&channel->inbound_lock); spin_lock_init(&channel->lock); INIT_LIST_HEAD(&channel->sc_list); INIT_LIST_HEAD(&channel->percpu_list); - channel->controlwq = create_workqueue("hv_vmbus_ctl"); + channel->controlwq = alloc_workqueue("hv_vmbus_ctl/%d", WQ_MEM_RECLAIM, +1, channel->id); if (!channel->controlwq) { kfree(channel); return NULL; diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index e647505..544b1f2 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -811,10 +811,8 @@ int vmbus_device_register(struct hv_device *child_device_obj) { int ret = 0; - static atomic_t device_num = ATOMIC_INIT(0); - - dev_set_name(&child_device_obj->device, "vmbus_0_%d", -atomic_inc_return(&device_num)); + dev_set_name(&child_device_obj->device, "vmbus_%d", +child_device_obj->channel->id); child_device_obj->device.bus = &hv_bus; child_device_obj->device.parent = &hv_acpi_dev->dev; diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 02dd978..af73b85 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -634,6 +634,9 @@ struct hv_input_signal_event_buffer { }; struct vmbus_channel { + /* Unique channel id */ + int id; + struct list_head listentry; struct hv_device *device_obj; -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH 0/2] staging: comedi: vmk80xx: misc cleanup
On Thursday, January 22, 2015 3:31 AM, Ian Abbott wrote: > On 22/01/15 00:22, H Hartley Sweeten wrote: >> A couple cleanup patches for the vmk80xx driver. >> >> H Hartley Sweeten (2): >>staging: comedi: vmk80xx: GPCT_RESET is not an (*insn_config) instruction >>staging: comedi: vmk80xx: tidy up vmk80xx_cnt_insn_config() >> >> drivers/staging/comedi/drivers/vmk80xx.c | 46 >> ++-- >> 1 file changed, 20 insertions(+), 26 deletions(-) >> > > Reviewed-by: Ian Abbott Ian, The only GPCT_* define from comedi.h that is used is GPCT_RESET. That one is Only used in some #if 0'ed out code in ni_mio_comon.c and that code would not compile if it was enabled. Do you see any problems in just removing those defines from comedi.h? Specifically I'm referring to this block: /* counters -- these are arbitrary values */ #define GPCT_RESET 0x0001 #define GPCT_SET_SOURCE 0x0002 #define GPCT_SET_GATE 0x0004 #define GPCT_SET_DIRECTION 0x0008 #define GPCT_SET_OPERATION 0x0010 #define GPCT_ARM0x0020 #define GPCT_DISARM 0x0040 #define GPCT_GET_INT_CLK_FRQ0x0080 #define GPCT_INT_CLOCK 0x0001 #define GPCT_EXT_PIN0x0002 #define GPCT_NO_GATE0x0004 #define GPCT_UP 0x0008 #define GPCT_DOWN 0x0010 #define GPCT_HWUD 0x0020 #define GPCT_SIMPLE_EVENT 0x0040 #define GPCT_SINGLE_PERIOD 0x0080 #define GPCT_SINGLE_PW 0x0100 #define GPCT_CONT_PULSE_OUT 0x0200 #define GPCT_SINGLE_PULSE_OUT 0x0400 Regards, Hartley ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 55/69] staging: unisys: get rid of LOGWRN() macro and uisklog.h
On Thu, 2015-01-22 at 11:19 +0800, Greg KH wrote: > On Wed, Jan 21, 2015 at 06:53:31PM +0300, Dan Carpenter wrote: > > Generally "delete code" patches are easy to review. But sometimes you > > have to change formatting and remove variables and curly braces. > > > > $ grep LOG drivers/staging/unisys/ -R | wc -l > > 415 > > > > There isn't a firm rule on way a patch is just too big and annoying to > > review. Probably break it up into: > > > > [patch 1/x] delete LOGINF() > > [patch 2/x] delete LOGERR() > > ... > > Yes, this would be best. > > Always remember, what would you like to have to review if you were the > receiver of patches? > > thanks, > > greg k-h Thank you both for the feedback. :) I'll do one patch per macro. -- Ben ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: ashmem - missing linux/types.h in header.
On Thu, Jan 22, 2015 at 10:24:49AM +0100, Gabriel Laskar wrote: > struct ashmem_pin uses __u32 types that are defined in linux/types.h. > > Signed-off-by: Gabriel Laskar > --- > drivers/staging/android/uapi/ashmem.h | 1 + > 1 file changed, 1 insertion(+) What is broken without this change? Is something failing to build? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/6] staging: comedi: ni_labpc: misc cleanup
On 21/01/15 22:11, H Hartley Sweeten wrote: A couple misc patches for the ni_labpc drivers. H Hartley Sweeten (6): staging: comedi: ni_labpc_common: move comedi_alloc_devpriv() to common code staging: comedi: ni_labpc_cs: remove unnecessary includes staging: comedi: ni_labpc: remove unnecessary private data validation staging: comedi: ni_labpc_common: use DIV_ROUND_UP to round divisor values staging: comedi: ni_labpc_common: use DIV_ROUND_CLOSEST to round divisor values staging: comedi: ni_labpc_common: use the cfc_check_trigger_arg_*() helpers drivers/staging/comedi/drivers/ni_labpc.c| 11 +- drivers/staging/comedi/drivers/ni_labpc_common.c | 47 +++- drivers/staging/comedi/drivers/ni_labpc_cs.c | 15 ++-- drivers/staging/comedi/drivers/ni_labpc_pci.c| 5 --- 4 files changed, 25 insertions(+), 53 deletions(-) Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: staging/dgap/dgap.c:981: bad if test ?
Hello there, > On Thu, Jan 22, 2015 at 10:20:44AM +, David Binderman wrote: >> I used the static analyser cppcheck to find these two bugs, but >> you might be able to find similar problems by using gcc compiler >> flag -Wlogical-op. > > I turned it on, but GCC 4.7.2 doesn't find anything for me. Surprising. I note that gcc 4.7.2 is dated Sep 2012 and the current release of gcc is 4.9.2, dated Oct 2014. I am not sure upgrading gcc will help. > Smatch is similar to GCC in this regard... cppcheck is available from sourceforge. Regards David Binderman ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: staging/dgap/dgap.c:981: bad if test ?
On Thu, Jan 22, 2015 at 10:20:44AM +, David Binderman wrote: > I used the static analyser cppcheck to find these two bugs, but > you might be able to find similar problems by using gcc compiler > flag -Wlogical-op. I turned it on, but GCC 4.7.2 doesn't find anything for me. It complains about: if (x != 1 || x != 2) but it doesn't complain about: if (x == 0 || x != 1 || x != 2) Smatch is similar to GCC in this regard... regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/2] staging: comedi: vmk80xx: misc cleanup
On 22/01/15 00:22, H Hartley Sweeten wrote: A couple cleanup patches for the vmk80xx driver. H Hartley Sweeten (2): staging: comedi: vmk80xx: GPCT_RESET is not an (*insn_config) instruction staging: comedi: vmk80xx: tidy up vmk80xx_cnt_insn_config() drivers/staging/comedi/drivers/vmk80xx.c | 46 ++-- 1 file changed, 20 insertions(+), 26 deletions(-) Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: staging/dgap/dgap.c:981: bad if test ?
Hello there, Thanks for the confirmation. More of the same in the same file: [linux-3.19-rc5/drivers/staging/dgap/dgap.c:1022]: (warning) Logical disjunction always evaluates to true: module_type != 68 || module_type != 73. Source code is if (module_type == 0 || module_type != PORTS || module_type != MODEM) { I used the static analyser cppcheck to find these two bugs, but you might be able to find similar problems by using gcc compiler flag -Wlogical-op. Regards David Binderman > Date: Thu, 22 Jan 2015 13:14:22 +0300 > From: dan.carpen...@oracle.com > To: dcb...@hotmail.com; daeseok.y...@gmail.com > CC: driverdev-devel@linuxdriverproject.org > Subject: Re: staging/dgap/dgap.c:981: bad if test ? > > > On Thu, Jan 22, 2015 at 10:05:53AM +, David Binderman wrote: >> Hello there, >> >> [linux-3.19-rc5/drivers/staging/dgap/dgap.c:981]: (warning) Logical >> disjunction always evaluates to true: conc_type != 65 || conc_type != 66. >> >> Source code is >> >> if (conc_type == 0 || conc_type != CX || >> conc_type != EPC) { >> >> Suggest code rework. > > Thanks. This bug was introduced in: > > commit f6aa0164cd3b1c5192e87f5651ec382c3bc3abac > Author: Daeseok Youn > Date: Sat Aug 9 14:38:41 2014 +0900 > > staging: dgap: Simplify to set a concentrator type > > It is same manner with setting a board type. > For example of config file for concentrator, > "conc ccon" or > "conc epcon" > > After allocating a type of "CNODE" then set a type of concentrator. > So remove cases in swith statement, just get a token from string > and set to "conc.type". And also it doesn't need to "conc.v_type". > > Signed-off-by: Daeseok Youn > Signed-off-by: Greg Kroah-Hartman > > Let's CC Daeseok. > > regards, > dan carpenter > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: staging/dgap/dgap.c:981: bad if test ?
On Thu, Jan 22, 2015 at 10:05:53AM +, David Binderman wrote: > Hello there, > > [linux-3.19-rc5/drivers/staging/dgap/dgap.c:981]: (warning) Logical > disjunction always evaluates to true: conc_type != 65 || conc_type != 66. > > Source code is > > if (conc_type == 0 || conc_type != CX || > conc_type != EPC) { > > Suggest code rework. Thanks. This bug was introduced in: commit f6aa0164cd3b1c5192e87f5651ec382c3bc3abac Author: Daeseok Youn Date: Sat Aug 9 14:38:41 2014 +0900 staging: dgap: Simplify to set a concentrator type It is same manner with setting a board type. For example of config file for concentrator, "conc ccon" or "conc epcon" After allocating a type of "CNODE" then set a type of concentrator. So remove cases in swith statement, just get a token from string and set to "conc.type". And also it doesn't need to "conc.v_type". Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman Let's CC Daeseok. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [RESEND PATCH v2 4/9] mfd: rtsx: update driving settings
On Thu, 2015-01-22 at 15:30 +0800, micky_ch...@realsil.com.cn wrote: > update card drive settings, This setting can be used for rts5249 > rts524A and rts525A. [] > diff --git a/drivers/mfd/rts5249.c b/drivers/mfd/rts5249.c > @@ -36,16 +36,16 @@ static u8 rts5249_get_ic_version(struct rtsx_pcr *pcr) > static void rts5249_fill_driving(struct rtsx_pcr *pcr, u8 voltage) > { > u8 driving_3v3[4][3] = { It'd be nice to make these arrays static const > - {0x11, 0x11, 0x11}, > + {0x11, 0x11, 0x18}, > {0x55, 0x55, 0x5C}, > - {0x99, 0x99, 0x92}, > - {0x99, 0x99, 0x92}, > + {0xFF, 0xFF, 0xFF}, > + {0x96, 0x96, 0x96}, > }; > u8 driving_1v8[4][3] = { > + {0xC4, 0xC4, 0xC4}, > {0x3C, 0x3C, 0x3C}, > - {0xB3, 0xB3, 0xB3}, > {0xFE, 0xFE, 0xFE}, > - {0xC4, 0xC4, 0xC4}, > + {0xB3, 0xB3, 0xB3}, > }; > u8 (*driving)[3], drive_sel; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
staging/dgap/dgap.c:981: bad if test ?
Hello there, [linux-3.19-rc5/drivers/staging/dgap/dgap.c:981]: (warning) Logical disjunction always evaluates to true: conc_type != 65 || conc_type != 66. Source code is if (conc_type == 0 || conc_type != CX || conc_type != EPC) { Suggest code rework. Regards David Binderman ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
rous, as they
Here was no Mexican Congress, and none had been convened since they were herded together at the conclusion of the Mexican War under protection of American troops. The condition of affairs in the United States was also extremely favorable. The treasury was overflowing with California gold, under the tariff of 1846 business was prosperous, the public debt small, and the future unclouded. The American Minister to Mexico (General Gadsden of South Caroli ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: ashmem - missing linux/types.h in header.
struct ashmem_pin uses __u32 types that are defined in linux/types.h. Signed-off-by: Gabriel Laskar --- drivers/staging/android/uapi/ashmem.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/android/uapi/ashmem.h b/drivers/staging/android/uapi/ashmem.h index ba4743c..13df42d 100644 --- a/drivers/staging/android/uapi/ashmem.h +++ b/drivers/staging/android/uapi/ashmem.h @@ -13,6 +13,7 @@ #define _UAPI_LINUX_ASHMEM_H #include +#include #define ASHMEM_NAME_LEN256 -- 2.2.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rts5028: use msecs_to_jiffies for timeouts
On Thu, 22 Jan 2015, wrote: > the title should be 5208. sorry - that was a typo - should this be resubmitted for traceability or is that not necessary ? > > On 01/19/2015 03:25 PM, Nicholas Mc Guire wrote: > > This is only an API consolidation and should make things more readable > > > > Signed-off-by: Nicholas Mc Guire > > --- > > > > Converting milliseconds to jiffies by val * HZ / 1000 is technically > > not wrong but msecs_to_jiffies(val) is the cleaner solution and handles > > corner cases correctly. > > > > This patch was only compile tested with x86_64_defconfig + CONFIG_STAGING=y, > > CONFIG_RTS5208=m > > > > Patch is against 3.19.0-rc4 -next-20150116 > > > > drivers/staging/rts5208/rtsx_transport.c | 12 ++-- > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/staging/rts5208/rtsx_transport.c > > b/drivers/staging/rts5208/rtsx_transport.c > > index 756a968..dab1995 100644 > > --- a/drivers/staging/rts5208/rtsx_transport.c > > +++ b/drivers/staging/rts5208/rtsx_transport.c > > @@ -271,7 +271,7 @@ int rtsx_send_cmd(struct rtsx_chip *chip, u8 card, int > > timeout) > > > > /* Wait for TRANS_OK_INT */ > > timeleft = wait_for_completion_interruptible_timeout( > > - &trans_done, timeout * HZ / 1000); > > + &trans_done, msecs_to_jiffies(timeout)); > > if (timeleft <= 0) { > > dev_dbg(rtsx_dev(chip), "chip->int_reg = 0x%x\n", > > chip->int_reg); > > @@ -431,7 +431,7 @@ static int rtsx_transfer_sglist_adma_partial(struct > > rtsx_chip *chip, u8 card, > > spin_unlock_irq(&rtsx->reg_lock); > > > > timeleft = wait_for_completion_interruptible_timeout( > > - &trans_done, timeout * HZ / 1000); > > + &trans_done, msecs_to_jiffies(timeout)); > > if (timeleft <= 0) { > > dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n", > > __func__, __LINE__); > > @@ -455,7 +455,7 @@ static int rtsx_transfer_sglist_adma_partial(struct > > rtsx_chip *chip, u8 card, > > init_completion(&trans_done); > > spin_unlock_irq(&rtsx->reg_lock); > > timeleft = wait_for_completion_interruptible_timeout( > > - &trans_done, timeout * HZ / 1000); > > + &trans_done, msecs_to_jiffies(timeout)); > > if (timeleft <= 0) { > > dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n", > > __func__, __LINE__); > > @@ -575,7 +575,7 @@ static int rtsx_transfer_sglist_adma(struct rtsx_chip > > *chip, u8 card, > > spin_unlock_irq(&rtsx->reg_lock); > > > > timeleft = wait_for_completion_interruptible_timeout( > > - &trans_done, timeout * HZ / 1000); > > + &trans_done, msecs_to_jiffies(timeout)); > > if (timeleft <= 0) { > > dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n", > > __func__, __LINE__); > > @@ -602,7 +602,7 @@ static int rtsx_transfer_sglist_adma(struct rtsx_chip > > *chip, u8 card, > > init_completion(&trans_done); > > spin_unlock_irq(&rtsx->reg_lock); > > timeleft = wait_for_completion_interruptible_timeout( > > - &trans_done, timeout * HZ / 1000); > > + &trans_done, msecs_to_jiffies(timeout)); > > if (timeleft <= 0) { > > dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n", > > __func__, __LINE__); > > @@ -688,7 +688,7 @@ static int rtsx_transfer_buf(struct rtsx_chip *chip, u8 > > card, void *buf, > > > > /* Wait for TRANS_OK_INT */ > > timeleft = wait_for_completion_interruptible_timeout( > > - &trans_done, timeout * HZ / 1000); > > + &trans_done, msecs_to_jiffies(timeout)); > > if (timeleft <= 0) { > > dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n", > > __func__, __LINE__); thx! hofrat ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel