dma: mv_xor: remove hw_id field from platform_data
There is no need for the platform_data to give this ID, it is simply the channel number, so we can compute it inside the driver when registering the channels. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
		
					parent
					
						
							
								c819ce177e
							
						
					
				
			
			
				commit
				
					
						9aedbdbab3
					
				
			
		
					 3 changed files with 3 additions and 8 deletions
				
			
		|  | @ -627,11 +627,9 @@ static struct resource orion_xor0_shared_resources[] = { | ||||||
| 
 | 
 | ||||||
| static struct mv_xor_channel_data orion_xor0_channels_data[2] = { | static struct mv_xor_channel_data orion_xor0_channels_data[2] = { | ||||||
| 	{ | 	{ | ||||||
| 		.hw_id		= 0, |  | ||||||
| 		.pool_size	= PAGE_SIZE, | 		.pool_size	= PAGE_SIZE, | ||||||
| 	}, | 	}, | ||||||
| 	{ | 	{ | ||||||
| 		.hw_id		= 1, |  | ||||||
| 		.pool_size	= PAGE_SIZE, | 		.pool_size	= PAGE_SIZE, | ||||||
| 	}, | 	}, | ||||||
| }; | }; | ||||||
|  | @ -702,11 +700,9 @@ static struct resource orion_xor1_shared_resources[] = { | ||||||
| 
 | 
 | ||||||
| static struct mv_xor_channel_data orion_xor1_channels_data[2] = { | static struct mv_xor_channel_data orion_xor1_channels_data[2] = { | ||||||
| 	{ | 	{ | ||||||
| 		.hw_id		= 0, |  | ||||||
| 		.pool_size	= PAGE_SIZE, | 		.pool_size	= PAGE_SIZE, | ||||||
| 	}, | 	}, | ||||||
| 	{ | 	{ | ||||||
| 		.hw_id		= 1, |  | ||||||
| 		.pool_size	= PAGE_SIZE, | 		.pool_size	= PAGE_SIZE, | ||||||
| 	}, | 	}, | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | @ -1088,7 +1088,7 @@ static int mv_xor_channel_remove(struct mv_xor_chan *mv_chan) | ||||||
| static struct mv_xor_chan * | static struct mv_xor_chan * | ||||||
| mv_xor_channel_add(struct mv_xor_device *xordev, | mv_xor_channel_add(struct mv_xor_device *xordev, | ||||||
| 		   struct platform_device *pdev, | 		   struct platform_device *pdev, | ||||||
| 		   int hw_id, dma_cap_mask_t cap_mask, | 		   int idx, dma_cap_mask_t cap_mask, | ||||||
| 		   size_t pool_size, int irq) | 		   size_t pool_size, int irq) | ||||||
| { | { | ||||||
| 	int ret = 0; | 	int ret = 0; | ||||||
|  | @ -1101,7 +1101,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev, | ||||||
| 		goto err_free_dma; | 		goto err_free_dma; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	mv_chan->idx = hw_id; | 	mv_chan->idx = idx; | ||||||
| 
 | 
 | ||||||
| 	dma_dev = &mv_chan->dmadev; | 	dma_dev = &mv_chan->dmadev; | ||||||
| 
 | 
 | ||||||
|  | @ -1295,7 +1295,7 @@ static int mv_xor_probe(struct platform_device *pdev) | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			xordev->channels[i] = | 			xordev->channels[i] = | ||||||
| 				mv_xor_channel_add(xordev, pdev, cd->hw_id, | 				mv_xor_channel_add(xordev, pdev, i, | ||||||
| 						   cd->cap_mask, | 						   cd->cap_mask, | ||||||
| 						   cd->pool_size, irq); | 						   cd->pool_size, irq); | ||||||
| 			if (IS_ERR(xordev->channels[i])) { | 			if (IS_ERR(xordev->channels[i])) { | ||||||
|  |  | ||||||
|  | @ -13,7 +13,6 @@ | ||||||
| #define MV_XOR_NAME	"mv_xor" | #define MV_XOR_NAME	"mv_xor" | ||||||
| 
 | 
 | ||||||
| struct mv_xor_channel_data { | struct mv_xor_channel_data { | ||||||
| 	int				hw_id; |  | ||||||
| 	dma_cap_mask_t			cap_mask; | 	dma_cap_mask_t			cap_mask; | ||||||
| 	size_t				pool_size; | 	size_t				pool_size; | ||||||
| }; | }; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thomas Petazzoni
				Thomas Petazzoni