History

spi: pxa2xx: No need to keep pointer to platform device

There is no need to keep a pointer to the platform device. Currently there are no users of it directly, and if there will be in the future we may restore it from pointer to the struct device. Convert all users at the same time.

Andy Shevchenko committed 7 years ago

Commit 4f3d9571 parent e74dc5c5 files · +10 −10Browse files

Unified · Split

5 files
  1. arch/arm/plat-pxa/ssp.c +2 −2
  2. drivers/spi/spi-pxa2xx.c +1 −1
  3. include/linux/pxa2xx_ssp.h +1 −1
  4. sound/soc/pxa/mmp-sspa.c +1 −1
  5. sound/soc/pxa/pxa-ssp.c +5 −5
arch/arm/plat-pxa/ssp.c+2−2
@@ -89,7 +89,7 @@ void pxa_ssp_free(struct ssp_device *ssp) · 88 unmodified lines
89 ssp->use_count--;89 ssp->use_count--;
90 ssp->label = NULL;90 ssp->label = NULL;
91 } else91 } else
92 dev_err(&ssp->pdev->dev, "device already free\n");92 dev_err(ssp->dev, "device already free\n");
93 mutex_unlock(&ssp_lock);93 mutex_unlock(&ssp_lock);
94}94}
95EXPORT_SYMBOL(pxa_ssp_free);95EXPORT_SYMBOL(pxa_ssp_free);
@@ -118,7 +118,7 @@ static int pxa_ssp_probe(struct platform_device *pdev) · 22 unmodified lines
118 if (ssp == NULL)118 if (ssp == NULL)
119 return -ENOMEM;119 return -ENOMEM;
120 120
121 ssp->pdev = pdev;121 ssp->dev = dev;
122 122
123 ssp->clk = devm_clk_get(dev, NULL);123 ssp->clk = devm_clk_get(dev, NULL);
124 if (IS_ERR(ssp->clk))124 if (IS_ERR(ssp->clk))
drivers/spi/spi-pxa2xx.c+1−1
@@ -1567,7 +1567,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) · 1566 unmodified lines
1567 ssp->clk = devm_clk_get(&pdev->dev, NULL);1567 ssp->clk = devm_clk_get(&pdev->dev, NULL);
1568 ssp->irq = platform_get_irq(pdev, 0);1568 ssp->irq = platform_get_irq(pdev, 0);
1569 ssp->type = type;1569 ssp->type = type;
1570 ssp->pdev = pdev;1570 ssp->dev = &pdev->dev;
1571 ssp->port_id = pxa2xx_spi_get_port_id(adev);1571 ssp->port_id = pxa2xx_spi_get_port_id(adev);
1572 1572
1573 pdata->is_slave = of_property_read_bool(pdev->dev.of_node, "spi-slave");1573 pdata->is_slave = of_property_read_bool(pdev->dev.of_node, "spi-slave");
include/linux/pxa2xx_ssp.h+1−1
@@ -206,7 +206,7 @@ enum pxa_ssp_type { · 205 unmodified lines
206};206};
207 207
208struct ssp_device {208struct ssp_device {
209 struct platform_device *pdev;209 struct device *dev;
210 struct list_head node;210 struct list_head node;
211 211
212 struct clk *clk;212 struct clk *clk;
sound/soc/pxa/mmp-sspa.c+1−1
@@ -177,7 +177,7 @@ static int mmp_sspa_set_dai_fmt(struct snd_soc_dai *cpu_dai, · 176 unmodified lines
177 /* we can only change the settings if the port is not in use */177 /* we can only change the settings if the port is not in use */
178 if ((mmp_sspa_read_reg(sspa, SSPA_TXSP) & SSPA_SP_S_EN) ||178 if ((mmp_sspa_read_reg(sspa, SSPA_TXSP) & SSPA_SP_S_EN) ||
179 (mmp_sspa_read_reg(sspa, SSPA_RXSP) & SSPA_SP_S_EN)) {179 (mmp_sspa_read_reg(sspa, SSPA_RXSP) & SSPA_SP_S_EN)) {
180 dev_err(&sspa->pdev->dev,180 dev_err(sspa->dev,
181 "can't change hardware dai format: stream is in use\n");181 "can't change hardware dai format: stream is in use\n");
182 return -EINVAL;182 return -EINVAL;
183 }183 }
sound/soc/pxa/pxa-ssp.c+5−5
@@ -52,11 +52,11 @@ struct ssp_priv { · 51 unmodified lines
52 52
53static void dump_registers(struct ssp_device *ssp)53static void dump_registers(struct ssp_device *ssp)
54{54{
55 dev_dbg(&ssp->pdev->dev, "SSCR0 0x%08x SSCR1 0x%08x SSTO 0x%08x\n",55 dev_dbg(ssp->dev, "SSCR0 0x%08x SSCR1 0x%08x SSTO 0x%08x\n",
56 pxa_ssp_read_reg(ssp, SSCR0), pxa_ssp_read_reg(ssp, SSCR1),56 pxa_ssp_read_reg(ssp, SSCR0), pxa_ssp_read_reg(ssp, SSCR1),
57 pxa_ssp_read_reg(ssp, SSTO));57 pxa_ssp_read_reg(ssp, SSTO));
58 58
59 dev_dbg(&ssp->pdev->dev, "SSPSP 0x%08x SSSR 0x%08x SSACD 0x%08x\n",59 dev_dbg(ssp->dev, "SSPSP 0x%08x SSSR 0x%08x SSACD 0x%08x\n",
60 pxa_ssp_read_reg(ssp, SSPSP), pxa_ssp_read_reg(ssp, SSSR),60 pxa_ssp_read_reg(ssp, SSPSP), pxa_ssp_read_reg(ssp, SSSR),
61 pxa_ssp_read_reg(ssp, SSACD));61 pxa_ssp_read_reg(ssp, SSACD));
62}62}
@@ -223,7 +223,7 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai, · 160 unmodified lines
223 clk_id = PXA_SSP_CLK_EXT;223 clk_id = PXA_SSP_CLK_EXT;
224 }224 }
225 225
226 dev_dbg(&ssp->pdev->dev,226 dev_dbg(ssp->dev,
227 "pxa_ssp_set_dai_sysclk id: %d, clk_id %d, freq %u\n",227 "pxa_ssp_set_dai_sysclk id: %d, clk_id %d, freq %u\n",
228 cpu_dai->id, clk_id, freq);228 cpu_dai->id, clk_id, freq);
229 229
@@ -316,7 +316,7 @@ static int pxa_ssp_set_pll(struct ssp_priv *priv, unsigned int freq) · 86 unmodified lines
316 316
317 ssacd |= (0x6 << 4);317 ssacd |= (0x6 << 4);
318 318
319 dev_dbg(&ssp->pdev->dev,319 dev_dbg(ssp->dev,
320 "Using SSACDD %x to supply %uHz\n",320 "Using SSACDD %x to supply %uHz\n",
321 val, freq);321 val, freq);
322 break;322 break;
@@ -687,7 +687,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, · 364 unmodified lines
687 * - complain loudly and fail if they've not been set up yet.687 * - complain loudly and fail if they've not been set up yet.
688 */688 */
689 if ((sscr0 & SSCR0_MOD) && !ttsa) {689 if ((sscr0 & SSCR0_MOD) && !ttsa) {
690 dev_err(&ssp->pdev->dev, "No TDM timeslot configured\n");690 dev_err(ssp->dev, "No TDM timeslot configured\n");
691 return -EINVAL;691 return -EINVAL;
692 }692 }
693 693

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t