Skip to content

Commit

Permalink
[SCSI] sgiwd93: Fix compilation warning
Browse files Browse the repository at this point in the history
The remove() callback in platform drivers should return int in
accordance to the definition of the platform_driver structure.
However, the SGI-specific WD93 SCSI controller driver defines
the callback as a void function, which causes the following
compilation warning:

drivers/scsi/sgiwd93.c:314: warning: initialization from
incompatible pointer type

This patch fixes the warning by changing the return type of
the remove() callback to what the core driver code requires.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Dmitri Vorobiev authored and James Bottomley committed Jan 2, 2009
1 parent 752b323 commit b99b4c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/sgiwd93.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static int __init sgiwd93_probe(struct platform_device *pdev)
return err;
}

static void __exit sgiwd93_remove(struct platform_device *pdev)
static int __exit sgiwd93_remove(struct platform_device *pdev)
{
struct Scsi_Host *host = platform_get_drvdata(pdev);
struct ip22_hostdata *hdata = (struct ip22_hostdata *) host->hostdata;
Expand All @@ -307,6 +307,7 @@ static void __exit sgiwd93_remove(struct platform_device *pdev)
free_irq(pd->irq, host);
dma_free_noncoherent(&pdev->dev, HPC_DMA_SIZE, hdata->cpu, hdata->dma);
scsi_host_put(host);
return 0;
}

static struct platform_driver sgiwd93_driver = {
Expand Down

0 comments on commit b99b4c6

Please sign in to comment.