Patchwork [02/11] UBUNTU: SAUCE: (drop after 2.6.39) staging: fix rts_pstor build errors

login
register
mail settings
Submitter Keng-Yu Lin
Date March 31, 2011, 3:51 a.m.
Message ID <1301543473-11146-3-git-send-email-keng-yu.lin@canonical.com>
Download mbox | patch
Permalink /patch/89011/
State New
Headers show

Comments

Keng-Yu Lin - March 31, 2011, 3:51 a.m.
From: Randy Dunlap <randy.dunlap@oracle.com>

Fix multiple rts_pstor build errors.

When CONFIG_PCI is not enabled:

drivers/staging/rts_pstor/rtsx.c: In function 'rtsx_acquire_irq':
drivers/staging/rts_pstor/rtsx.c:324: error: implicit declaration of function 'pci_intx'
drivers/staging/rts_pstor/rtsx.c: In function 'rtsx_read_pci_cfg_byte':
drivers/staging/rts_pstor/rtsx.c:336: error: implicit declaration of function 'pci_get_domain_bus_and_slot'
drivers/staging/rts_pstor/rtsx.c:336: warning: assignment makes pointer from integer without a cast
drivers/staging/rts_pstor/rtsx.c: In function 'rtsx_shutdown':
drivers/staging/rts_pstor/rtsx.c:462: error: implicit declaration of function 'pci_disable_msi'
drivers/staging/rts_pstor/rtsx.c: In function 'rtsx_probe':
drivers/staging/rts_pstor/rtsx.c:981: error: implicit declaration of function 'pci_enable_msi'

When CONFIG_SCSI is not enabled:

In file included from drivers/staging/rts_pstor/rtsx.h:45,
                 from drivers/staging/rts_pstor/rtsx.c:28:
include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined
include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB
In file included from drivers/staging/rts_pstor/rtsx.h:45,
                 from drivers/staging/rts_pstor/rtsx.c:28:
include/scsi/scsi_cmnd.h: In function 'scsi_bidi_cmnd':
include/scsi/scsi_cmnd.h:184: error: implicit declaration of function 'blk_bidi_rq'
include/scsi/scsi_cmnd.h:185: error: dereferencing pointer to incomplete type
include/scsi/scsi_cmnd.h: In function 'scsi_in':
include/scsi/scsi_cmnd.h:191: error: dereferencing pointer to incomplete type
include/scsi/scsi_cmnd.h: In function 'scsi_get_lba':  CC      drivers/gpu/drm/nouveau/nv04_tv.o

include/scsi/scsi_cmnd.h:269: error: implicit declaration of function 'blk_rq_pos'
In file included from drivers/staging/rts_pstor/rtsx.h:48,
                 from drivers/staging/rts_pstor/rtsx.c:28:
include/scsi/scsi_eh.h: At top level:
include/scsi/scsi_eh.h:84: error: 'BLK_MAX_CDB' undeclared here (not in a function)
drivers/staging/rts_pstor/rtsx.c: In function 'slave_configure':
drivers/staging/rts_pstor/rtsx.c:107: error: implicit declaration of function 'blk_queue_dma_alignment'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: wei_wang@realsil.com.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

BugLink: http://bugs.launchpad.net/bugs/698006
(cherry picked from commit 27a16811ab4dc819eebbd4e7b07d485f6e8f0134)

Signed-off-by: Keng-Yu Lin <keng-yu.lin@canonical.com>
---
 drivers/staging/rts_pstor/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/drivers/staging/rts_pstor/Kconfig b/drivers/staging/rts_pstor/Kconfig
index 972becd..4d66a99 100644
--- a/drivers/staging/rts_pstor/Kconfig
+++ b/drivers/staging/rts_pstor/Kconfig
@@ -1,5 +1,6 @@ 
 config RTS_PSTOR
 	tristate "RealTek PCI-E Card Reader support"
+	depends on PCI && SCSI
 	help
 	  Say Y here to include driver code to support the Realtek
 	  PCI-E card readers.