summaryrefslogtreecommitdiff
path: root/drivers/scsi/mac_esp.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-10-13 10:26:25 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-10-16 06:00:38 +0300
commit98cda6a2e0d46507c084bf1488f5627b9e487a2a (patch)
treecd5ea59e0f8d5e9549e48b19161e3f6167bd7031 /drivers/scsi/mac_esp.c
parent10c0cd38ce4cd2015a683e296596738adab9221f (diff)
downloadlinux-98cda6a2e0d46507c084bf1488f5627b9e487a2a.tar.xz
scsi: esp_scsi: use strong typing for the dev field
esp->dev is a void pointer that points either to a struct device, or a struct platform_device. As we can easily get from the device to the platform_device if needed change it to always point to a struct device and properly type the pointer to avoid errors. Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mac_esp.c')
-rw-r--r--drivers/scsi/mac_esp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c
index eb551f3cc471..85d067889a9b 100644
--- a/drivers/scsi/mac_esp.c
+++ b/drivers/scsi/mac_esp.c
@@ -58,8 +58,7 @@ static struct esp *esp_chips[2];
static DEFINE_SPINLOCK(esp_chips_lock);
#define MAC_ESP_GET_PRIV(esp) ((struct mac_esp_priv *) \
- platform_get_drvdata((struct platform_device *) \
- (esp->dev)))
+ dev_get_drvdata((esp)->dev))
static inline void mac_esp_write8(struct esp *esp, u8 val, unsigned long reg)
{
@@ -508,7 +507,7 @@ static int esp_mac_probe(struct platform_device *dev)
esp = shost_priv(host);
esp->host = host;
- esp->dev = dev;
+ esp->dev = &dev->dev;
esp->command_block = kzalloc(16, GFP_KERNEL);
if (!esp->command_block)