Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: rt5645: Move rt5645_platform_data to sound/soc/codecs/rt5645.c

sound/soc/codecs/rt5645.c is the only user of the rt5645_platform_data,
move its definition to sound/soc/codecs/rt5645.c and remove the now
empty include/sound/rt5645.h file.

Note since the DMI quirk mechanism uses pointers to the
rt5645_platform_data struct we can NOT simply add its members to
the rt5645_priv struct and completely remove the struct.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210306230223.516566-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Hans de Goede and committed by
Mark Brown
452801ca cc2d7429

+22 -35
-32
include/sound/rt5645.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 2 - /* 3 - * linux/sound/rt5645.h -- Platform data for RT5645 4 - * 5 - * Copyright 2013 Realtek Microelectronics 6 - */ 7 - 8 - #ifndef __LINUX_SND_RT5645_H 9 - #define __LINUX_SND_RT5645_H 10 - 11 - struct rt5645_platform_data { 12 - /* IN2 can optionally be differential */ 13 - bool in2_diff; 14 - 15 - unsigned int dmic1_data_pin; 16 - /* 0 = IN2N; 1 = GPIO5; 2 = GPIO11 */ 17 - unsigned int dmic2_data_pin; 18 - /* 0 = IN2P; 1 = GPIO6; 2 = GPIO10; 3 = GPIO12 */ 19 - 20 - unsigned int jd_mode; 21 - /* Use level triggered irq */ 22 - bool level_trigger_irq; 23 - /* Invert JD1_1 status polarity */ 24 - bool inv_jd1_1; 25 - /* Invert HP detect status polarity */ 26 - bool inv_hp_pol; 27 - 28 - /* Value to asign to snd_soc_card.long_name */ 29 - const char *long_name; 30 - }; 31 - 32 - #endif
+22 -1
sound/soc/codecs/rt5645.c
··· 411 411 "cpvdd", 412 412 }; 413 413 414 + struct rt5645_platform_data { 415 + /* IN2 can optionally be differential */ 416 + bool in2_diff; 417 + 418 + unsigned int dmic1_data_pin; 419 + /* 0 = IN2N; 1 = GPIO5; 2 = GPIO11 */ 420 + unsigned int dmic2_data_pin; 421 + /* 0 = IN2P; 1 = GPIO6; 2 = GPIO10; 3 = GPIO12 */ 422 + 423 + unsigned int jd_mode; 424 + /* Use level triggered irq */ 425 + bool level_trigger_irq; 426 + /* Invert JD1_1 status polarity */ 427 + bool inv_jd1_1; 428 + /* Invert HP detect status polarity */ 429 + bool inv_hp_pol; 430 + 431 + /* Value to assign to snd_soc_card.long_name */ 432 + const char *long_name; 433 + }; 434 + 414 435 struct rt5645_priv { 415 436 struct snd_soc_component *component; 416 437 struct rt5645_platform_data pdata; ··· 3855 3834 static int rt5645_i2c_probe(struct i2c_client *i2c, 3856 3835 const struct i2c_device_id *id) 3857 3836 { 3858 - struct rt5645_platform_data *pdata = dev_get_platdata(&i2c->dev); 3837 + struct rt5645_platform_data *pdata = NULL; 3859 3838 const struct dmi_system_id *dmi_data; 3860 3839 struct rt5645_priv *rt5645; 3861 3840 int ret, i;
-2
sound/soc/codecs/rt5645.h
··· 9 9 #ifndef __RT5645_H__ 10 10 #define __RT5645_H__ 11 11 12 - #include <sound/rt5645.h> 13 - 14 12 /* Info */ 15 13 #define RT5645_RESET 0x00 16 14 #define RT5645_VENDOR_ID 0xfd