Skip to content

Instantly share code, notes, and snippets.

@latot
Created April 15, 2015 18:26
Show Gist options
  • Save latot/cc26184d5f0701dd66c2 to your computer and use it in GitHub Desktop.
Save latot/cc26184d5f0701dd66c2 to your computer and use it in GitHub Desktop.
Patch rst_bpp
diff -rupN rts_bpp/Makefile rts_bpp2/Makefile
--- rts_bpp/Makefile 2011-12-05 00:41:03.000000000 -0300
+++ rts_bpp2/Makefile 2015-04-15 15:01:59.564087000 -0300
@@ -24,7 +24,7 @@
TARGET_MODULE := rts_bpp
-EXTRA_CFLAGS := -Idrivers/scsi
+EXTRA_CFLAGS := -Idrivers/scsi -Wno-error=date-time
obj-m += $(TARGET_MODULE).o
diff -rupN rts_bpp/rtsx.c rts_bpp2/rtsx.c
--- rts_bpp/rtsx.c 2011-12-05 00:41:04.000000000 -0300
+++ rts_bpp2/rtsx.c 2015-04-15 14:54:21.181443000 -0300
@@ -122,39 +122,6 @@ static int slave_configure(struct scsi_d
#define SPRINTF(args...) \
do { if (pos < buffer+length) pos += sprintf(pos, ## args); } while (0)
-static int proc_info (struct Scsi_Host *host, char *buffer,
- char **start, off_t offset, int length, int inout)
-{
- char *pos = buffer;
-
-
- if (inout)
- return length;
-
-
- SPRINTF(" Host scsi%d: %s\n", host->host_no, CR_DRIVER_NAME);
-
-
- SPRINTF(" Vendor: Realtek Corp.\n");
- SPRINTF(" Product: Barossa Plusplus\n");
- SPRINTF(" Version: %s\n", DRIVER_VERSION);
- SPRINTF(" Build: %s\n", __TIME__);
-
- /*
- * Calculate start of next buffer, and return value.
- */
- *start = buffer + offset;
-
- if ((pos - buffer) < offset)
- return (0);
- else if ((pos - buffer - offset) < length)
- return (pos - buffer - offset);
- else
- return (length);
-}
-
-
-
static int queuecommand_lck(struct scsi_cmnd *srb,
void (*done)(struct scsi_cmnd *))
{
@@ -256,7 +223,6 @@ static struct scsi_host_template rtsx_ho
.name = CR_DRIVER_NAME,
.proc_name = CR_DRIVER_NAME,
- .proc_info = proc_info,
.info = host_info,
@@ -890,7 +856,7 @@ static void rtsx_init_options(struct rts
chip->handshake_en = 1;
}
-static int __devinit rtsx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
+static int rtsx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
{
struct Scsi_Host *host;
struct rtsx_dev *dev;
@@ -1045,7 +1011,7 @@ errout:
}
-static void __devexit rtsx_remove(struct pci_dev *pci)
+static void rtsx_remove(struct pci_dev *pci)
{
struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci);
@@ -1071,7 +1037,7 @@ static struct pci_driver driver = {
.name = CR_DRIVER_NAME,
.id_table = rts_bpp_ids,
.probe = rtsx_probe,
- .remove = __devexit_p(rtsx_remove),
+ .remove = rtsx_remove,
#ifdef CONFIG_PM
.suspend = rtsx_suspend,
.resume = rtsx_resume,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment