libata: allocate ap separately from shost
Don't embed ap inside shost. Allocate it separately and point it back from shosts's hostdata. This makes port allocation more flexible and allows regular ATA and SAS share host alloc/init paths. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
bf33554290
commit
4911487a34
2 changed files with 15 additions and 6 deletions
|
@ -1231,7 +1231,7 @@ static inline void ata_pad_free(struct ata_port *ap, struct device *dev)
|
|||
|
||||
static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host)
|
||||
{
|
||||
return (struct ata_port *) &host->hostdata[0];
|
||||
return *(struct ata_port **)&host->hostdata[0];
|
||||
}
|
||||
|
||||
#endif /* __LINUX_LIBATA_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue